Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(never): convert never specs to run mode #6962

Merged
merged 1 commit into from Sep 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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