Skip to content

Instantly share code, notes, and snippets.

@taras
Last active April 29, 2019 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taras/5d2db2ae1e9a22cc7279dd05bd584d44 to your computer and use it in GitHub Desktop.
Save taras/5d2db2ae1e9a22cc7279dd05bd584d44 to your computer and use it in GitHub Desktop.
describe("composed microstates", () => {
let person: Person;
class Person {
name: StringType = child(StringType);
}
beforeEach(() => {
person = create(Person);
});
it('has person be of Person type', () => {
expectType<Person>(person);
});
describe("result of a transition", () => {
beforeEach(() => {
person = person.name.set('Taras');
});
it('is of Person type', () => {
expectType<Person>(person);
})
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment