M2 (TDD): storage contract test + memory impl
- src/storage/contract.test.js: storage interface spec (19 assertions) - src/storage/memory.js: in-process impl (Map + EventEmitter) - src/storage/storage.test.js: runner, memory first TDD: contract RED first, memory built to satisfy, 19/19 green. Next impls (ws, firebase) run same contract.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// Runner: executes storage contract against each impl.
|
||||
// TDD: contract = spec. Run against memory first. RED until memory.js built.
|
||||
'use strict';
|
||||
|
||||
const { runStorageContract } = require('./contract.test');
|
||||
const { createMemoryStorage } = require('./memory');
|
||||
|
||||
runStorageContract('memory', () => createMemoryStorage());
|
||||
Reference in New Issue
Block a user