row 283 (#1788): mos-1272 first-run red: supporting.test's refuses() labelled each assertion with JSON.stringify(path), which throws on the 1n case added for E3; it now uses util.inspect. Test helper only
This commit is contained in:
1 parent
de6419f30f
commit
54d9e07bb7
1 file changed
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
import test from 'node:test';
|
import test from 'node:test';
|
||||||
import assert from 'node:assert/strict';
|
import assert from 'node:assert/strict';
|
||||||
|
import { inspect } from 'node:util';
|
||||||
import { LibraryError, supportingPath } from '../src/index.mjs';
|
import { LibraryError, supportingPath } from '../src/index.mjs';
|
||||||
import { mapping } from './helpers.mjs';
|
import { mapping } from './helpers.mjs';
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ const tree = [
|
|||||||
blob('Harbor Notes/Places/Island.md'),
|
blob('Harbor Notes/Places/Island.md'),
|
||||||
];
|
];
|
||||||
const refuses = (universe, path, pattern) => assert.throws(() => supportingPath(m, universe, path, tree),
|
const refuses = (universe, path, pattern) => assert.throws(() => supportingPath(m, universe, path, tree),
|
||||||
e => e instanceof LibraryError && e.code === 'library-write-story-path' && pattern.test(e.message), JSON.stringify(path));
|
e => e instanceof LibraryError && e.code === 'library-write-story-path' && pattern.test(e.message), inspect(path));
|
||||||
|
|
||||||
test('C2-01d: a path passes at book level, universe level, in a draft and in a folder in both lists', () => {
|
test('C2-01d: a path passes at book level, universe level, in a draft and in a folder in both lists', () => {
|
||||||
for (const [universe, path] of [['harbor', 'Book One/Notes/Characters/New.md'], ['harbor', 'Book One/Notes/Existing.md'],
|
for (const [universe, path] of [['harbor', 'Book One/Notes/Characters/New.md'], ['harbor', 'Book One/Notes/Existing.md'],
|
||||||
|
|||||||
Reference in new issue
Block a user