Skip to content

Commit

Permalink
chore(never): convert never specs to run mode (#6962)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmair committed Sep 25, 2022
1 parent a2f5bad commit 45b734b
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions spec/observables/never-spec.ts
@@ -1,13 +1,23 @@
/** @prettier */
import { NEVER } from 'rxjs';
import { expect } from 'chai';
import { expectObservable } from '../helpers/marble-testing';
import { TestScheduler } from 'rxjs/testing';
import { observableMatcher } from '../helpers/observableMatcher';

/** @test {NEVER} */
describe('NEVER', () => {
let rxTestScheduler: TestScheduler;

beforeEach(() => {
rxTestScheduler = new TestScheduler(observableMatcher);
});

it('should create a cold observable that never emits', () => {
const expected = '-';
const e1 = NEVER;
expectObservable(e1).toBe(expected);
rxTestScheduler.run(({ expectObservable }) => {
const expected = '-';
const e1 = NEVER;
expectObservable(e1).toBe(expected);
});
});

it('should return the same instance every time', () => {
Expand Down

0 comments on commit 45b734b

Please sign in to comment.