add mock source

This commit is contained in:
Matt Hill
2021-11-30 21:00:33 -07:00
committed by Aiden McClelland
parent a724d6ec6b
commit 678d7b3322
3 changed files with 23 additions and 6 deletions

View File

@@ -0,0 +1,14 @@
import { Observable } from 'rxjs'
import { Update } from '../types'
import { Source } from './source'
export class MockSource<T> implements Source<T> {
constructor (
private readonly seed: Observable<Update<T>>,
) { }
watch$ (): Observable<Update<T>> {
return this.seed
}
}