Skip to content

Instantly share code, notes, and snippets.

View erichulburd's full-sized avatar

Eric Hulburd erichulburd

  • Rigetti Computing
  • Berkeley, CA
View GitHub Profile
context('game is paused', () => {
afterEach(() => {
Observable.interval.restore();
});
it(`interval starts when user starts game and is stopped when end emitted`, () => {
const testScheduler = new TestScheduler((actual, expected) => {
expect(actual).to.deep.equal(expected);
});
context('user will lose', () => {
afterEach(() => {
Observable.interval.restore();
});
it('does not restart game when ongoing and emits end event when user loses', () => {
const testScheduler = new TestScheduler((actual, expected) => {
expect(actual).to.deep.equal(expected);
});
// ...
it('does not restart game when ongoing and emits end event when user loses', () => {
const testScheduler = new TestScheduler((actual, expected) => {
expect(actual).to.deep.equal(expected);
});
const interval$ = testScheduler.createColdObservable('--a--b', {
a: 0,
a: 1
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.