mirror of
https://github.com/google-map-react/google-map-react.git
synced 2025-12-08 18:26:32 +00:00
18 lines
598 B
JavaScript
18 lines
598 B
JavaScript
/* eslint-disable max-len */
|
|
// `npm bin`/mocha --compilers js:babel-register --require babel-polyfill --reporter min --watch './develop/**/*.spec.js'
|
|
/* eslint-enable max-len */
|
|
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
|
import 'rxjs/add/operator/distinctUntilChanged';
|
|
|
|
describe('Playground', () => {
|
|
it('Play', async () => {
|
|
const comparator = (a, b) => a === b;
|
|
const props$ = new BehaviorSubject(1).distinctUntilChanged(comparator);
|
|
|
|
props$.subscribe(v => console.log(v)); // eslint-disable-line
|
|
props$.next(1);
|
|
props$.next(2);
|
|
props$.next(1);
|
|
});
|
|
});
|