@devrik-tools/claude-gates 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +7 -1
- package/cli/__tests__/config.test.mjs +113 -101
- package/cli/__tests__/install.test.mjs +102 -0
- package/cli/__tests__/materialize.test.mjs +95 -0
- package/cli/__tests__/registry-gates-consistency.test.mjs +52 -44
- package/cli/__tests__/task.test.mjs +124 -0
- package/cli/__tests__/version-consistency.test.mjs +44 -0
- package/cli/config.mjs +124 -113
- package/cli/index.mjs +100 -97
- package/cli/init.mjs +259 -256
- package/cli/install.mjs +150 -80
- package/cli/materialize.mjs +102 -51
- package/cli/registry.mjs +136 -127
- package/cli/task.mjs +140 -0
- package/package.json +2 -1
- package/plugins/gates/.claude-plugin/plugin.json +8 -2
- package/plugins/gates/hooks/__tests__/ask-adoption.test.mjs +83 -0
- package/plugins/gates/hooks/__tests__/doctor.test.mjs +85 -0
- package/plugins/gates/hooks/__tests__/wiring-check.test.mjs +65 -0
- package/plugins/gates/hooks/ask-adoption.mjs +147 -0
- package/plugins/gates/hooks/doctor.mjs +207 -0
- package/plugins/gates/hooks/gates/audit-before-build/audit-before-build.edge.test.mjs +83 -0
- package/plugins/gates/hooks/gates/audit-before-build/index.mjs +88 -88
- package/plugins/gates/hooks/gates/audit-before-build/test.mjs +117 -92
- package/plugins/gates/hooks/gates/autonomous-mode/autonomous.edge.test.mjs +104 -0
- package/plugins/gates/hooks/gates/autonomous-mode/index.mjs +48 -45
- package/plugins/gates/hooks/gates/bash-commands/bash-commands.edge.test.mjs +165 -0
- package/plugins/gates/hooks/gates/bash-commands/index.mjs +285 -268
- package/plugins/gates/hooks/gates/brief-before-delegate/brief-before-delegate.edge.test.mjs +151 -0
- package/plugins/gates/hooks/gates/brief-before-delegate/index.mjs +265 -177
- package/plugins/gates/hooks/gates/circuit-breaker/circuit-breaker.edge.test.mjs +207 -0
- package/plugins/gates/hooks/gates/circuit-breaker/index.mjs +501 -456
- package/plugins/gates/hooks/gates/circuit-breaker/test.mjs +161 -143
- package/plugins/gates/hooks/gates/dependency-skills/dependency-skills.edge.test.mjs +69 -0
- package/plugins/gates/hooks/gates/dependency-skills/index.mjs +126 -118
- package/plugins/gates/hooks/gates/diagnosis-before-patch/diagnosis-before-patch.edge.test.mjs +68 -0
- package/plugins/gates/hooks/gates/diagnosis-before-patch/index.mjs +43 -49
- package/plugins/gates/hooks/gates/feature-catalog/edge.edge.test.mjs +83 -0
- package/plugins/gates/hooks/gates/feature-catalog/index.mjs +83 -100
- package/plugins/gates/hooks/gates/force-parallel/index.mjs +119 -0
- package/plugins/gates/hooks/gates/force-parallel/test.mjs +88 -0
- package/plugins/gates/hooks/gates/forge-flow/forge-flow.edge.test.mjs +155 -0
- package/plugins/gates/hooks/gates/forge-flow/index.mjs +134 -112
- package/plugins/gates/hooks/gates/implementation-pipeline/edge.edge.test.mjs +66 -0
- package/plugins/gates/hooks/gates/implementation-pipeline/index.mjs +187 -186
- package/plugins/gates/hooks/gates/intent-flow/index.mjs +260 -238
- package/plugins/gates/hooks/gates/intent-flow/intent-flow.edge.test.mjs +96 -0
- package/plugins/gates/hooks/gates/intent-flow/test.mjs +165 -136
- package/plugins/gates/hooks/gates/lint-commit/index.mjs +149 -0
- package/plugins/gates/hooks/gates/lint-commit/test.mjs +85 -0
- package/plugins/gates/hooks/gates/mandatory-flow/edge.edge.test.mjs +100 -0
- package/plugins/gates/hooks/gates/mandatory-flow/index.mjs +180 -166
- package/plugins/gates/hooks/gates/neutral-spanish/index.mjs +79 -85
- package/plugins/gates/hooks/gates/neutral-spanish/neutral-spanish.edge.test.mjs +80 -0
- package/plugins/gates/hooks/gates/never-assume/index.mjs +58 -55
- package/plugins/gates/hooks/gates/never-assume/never-assume.edge.test.mjs +71 -0
- package/plugins/gates/hooks/gates/never-assume/test.mjs +95 -78
- package/plugins/gates/hooks/gates/no-blocking/index.mjs +148 -142
- package/plugins/gates/hooks/gates/no-blocking/no-blocking.edge.test.mjs +109 -0
- package/plugins/gates/hooks/gates/no-memory-dependency/index.mjs +123 -120
- package/plugins/gates/hooks/gates/no-memory-dependency/no-memory-dependency.edge.test.mjs +83 -0
- package/plugins/gates/hooks/gates/no-reconfirm/no-reconfirm.edge.test.mjs +91 -0
- package/plugins/gates/hooks/gates/protected-paths/index.mjs +144 -147
- package/plugins/gates/hooks/gates/protected-paths/protected-paths.edge.test.mjs +126 -0
- package/plugins/gates/hooks/gates/recurrence-lock/index.mjs +89 -64
- package/plugins/gates/hooks/gates/recurrence-lock/recurrence-lock.edge.test.mjs +102 -0
- package/plugins/gates/hooks/gates/reuse-before-build/edge.edge.test.mjs +94 -0
- package/plugins/gates/hooks/gates/reuse-before-build/index.mjs +159 -150
- package/plugins/gates/hooks/gates/risk-level/index.mjs +263 -203
- package/plugins/gates/hooks/gates/risk-level/risk-level.edge.test.mjs +116 -0
- package/plugins/gates/hooks/gates/risk-level/test.mjs +153 -125
- package/plugins/gates/hooks/gates/root-cause-first/index.mjs +56 -50
- package/plugins/gates/hooks/gates/root-cause-first/root-cause-first.edge.test.mjs +58 -0
- package/plugins/gates/hooks/gates/root-whitelist/index.mjs +116 -111
- package/plugins/gates/hooks/gates/root-whitelist/root-whitelist.edge.test.mjs +97 -0
- package/plugins/gates/hooks/gates/rule-skill-autodiscovery/index.mjs +184 -99
- package/plugins/gates/hooks/gates/rule-skill-autodiscovery/rule-skill-autodiscovery.edge.test.mjs +126 -0
- package/plugins/gates/hooks/gates/sdd-specs/edge.edge.test.mjs +130 -0
- package/plugins/gates/hooks/gates/sdd-specs/index.mjs +256 -251
- package/plugins/gates/hooks/gates/stop-pending/index.mjs +159 -0
- package/plugins/gates/hooks/gates/stop-pending/test.mjs +114 -0
- package/plugins/gates/hooks/gates/test-after-implementation/index.mjs +101 -101
- package/plugins/gates/hooks/gates/test-after-implementation/test-after-implementation.edge.test.mjs +72 -0
- package/plugins/gates/hooks/gates/test-matrix/edge.edge.test.mjs +63 -0
- package/plugins/gates/hooks/gates/test-matrix/index.mjs +187 -181
- package/plugins/gates/hooks/gates/test-matrix/test.mjs +114 -87
- package/plugins/gates/hooks/gates/tool-map/edge.edge.test.mjs +62 -0
- package/plugins/gates/hooks/gates/tool-map/index.mjs +143 -140
- package/plugins/gates/hooks/hooks.json +346 -286
- package/plugins/gates/hooks/lib/__tests__/config.test.mjs +173 -154
- package/plugins/gates/hooks/lib/__tests__/hook-io.test.mjs +210 -154
- package/plugins/gates/hooks/lib/__tests__/signals.test.mjs +114 -0
- package/plugins/gates/hooks/lib/config.mjs +172 -165
- package/plugins/gates/hooks/lib/hook-io-config.edge.test.mjs +189 -0
- package/plugins/gates/hooks/lib/hook-io.mjs +318 -208
- package/plugins/gates/hooks/lib/signals.mjs +127 -0
- package/plugins/gates/hooks/wiring-check.mjs +227 -0
- package/plugins/tasks/.claude-plugin/plugin.json +14 -0
- package/plugins/tasks/hooks/__tests__/register-requests.test.mjs +100 -0
- package/plugins/tasks/hooks/__tests__/session-tasks.test.mjs +95 -0
- package/plugins/tasks/hooks/hooks.json +26 -0
- package/plugins/tasks/hooks/lib/__tests__/task-store.test.mjs +180 -132
- package/plugins/tasks/hooks/lib/task-store.mjs +197 -159
- package/plugins/tasks/hooks/register-requests.mjs +141 -108
- package/plugins/tasks/hooks/session-tasks.mjs +108 -0
- package/registry.json +793 -686
|
@@ -1,132 +1,180 @@
|
|
|
1
|
-
import assert from 'node:assert/strict';
|
|
2
|
-
import {
|
|
3
|
-
mkdtempSync,
|
|
4
|
-
mkdirSync,
|
|
5
|
-
existsSync,
|
|
6
|
-
readFileSync,
|
|
7
|
-
writeFileSync,
|
|
8
|
-
} from 'node:fs';
|
|
9
|
-
import { tmpdir } from 'node:os';
|
|
10
|
-
import { join } from 'node:path';
|
|
11
|
-
import { test } from 'node:test';
|
|
12
|
-
import { openTaskStore, STATUS } from '../task-store.mjs';
|
|
13
|
-
|
|
14
|
-
// A temp project with a .git marker, so the store anchors its .ai/tasks/ there.
|
|
15
|
-
function makeProject() {
|
|
16
|
-
const project = mkdtempSync(join(tmpdir(), 'task-store-'));
|
|
17
|
-
mkdirSync(join(project, '.git'));
|
|
18
|
-
return project;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function sampleTask(id) {
|
|
22
|
-
return {
|
|
23
|
-
id,
|
|
24
|
-
title: `task ${id}`,
|
|
25
|
-
description: 'desc',
|
|
26
|
-
status: STATUS.OPEN,
|
|
27
|
-
size: 'trivial',
|
|
28
|
-
createdAt: new Date().toISOString(),
|
|
29
|
-
messages: [],
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
test('openTaskStore anchors at the nearest project marker (.ai/ counts, not only .git)', () => {
|
|
34
|
-
// A project rooted only by .ai/ (no .git) must still resolve — the repo-less case.
|
|
35
|
-
const project = mkdtempSync(join(tmpdir(), 'ai-only-'));
|
|
36
|
-
mkdirSync(join(project, '.ai'));
|
|
37
|
-
const nested = join(project, 'src', 'deep');
|
|
38
|
-
mkdirSync(nested, { recursive: true });
|
|
39
|
-
const store = openTaskStore(nested);
|
|
40
|
-
assert.ok(
|
|
41
|
-
store,
|
|
42
|
-
'store resolves from a nested dir under an .ai/-rooted project',
|
|
43
|
-
);
|
|
44
|
-
assert.equal(store.root, project);
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
test('add and active: a new task shows up in active', () => {
|
|
48
|
-
const store = openTaskStore(makeProject());
|
|
49
|
-
store.add(sampleTask('t1'));
|
|
50
|
-
const active = store.active();
|
|
51
|
-
assert.equal(active.length, 1);
|
|
52
|
-
assert.equal(active[0].id, 't1');
|
|
53
|
-
assert.deepEqual(store.history(), []);
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
test('update merges fields into the active task', () => {
|
|
57
|
-
const store = openTaskStore(makeProject());
|
|
58
|
-
store.add(sampleTask('t1'));
|
|
59
|
-
store.update('t1', { status: STATUS.BLOCKED, note: 'waiting' });
|
|
60
|
-
const task = store.active()[0];
|
|
61
|
-
assert.equal(task.status, STATUS.BLOCKED);
|
|
62
|
-
assert.equal(task.note, 'waiting');
|
|
63
|
-
assert.equal(store.update('missing', {}), null);
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
test('close MOVES a task from active to history, never deletes', () => {
|
|
67
|
-
const store = openTaskStore(makeProject());
|
|
68
|
-
store.add(sampleTask('t1'));
|
|
69
|
-
store.add(sampleTask('t2'));
|
|
70
|
-
|
|
71
|
-
const closed = store.close('t1', STATUS.DONE,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
assert.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
assert.deepEqual(
|
|
81
|
-
store.
|
|
82
|
-
['
|
|
83
|
-
);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
assert.equal(store.
|
|
106
|
-
store.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
store.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
store.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
assert.
|
|
129
|
-
store.
|
|
130
|
-
assert.
|
|
131
|
-
|
|
132
|
-
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import {
|
|
3
|
+
mkdtempSync,
|
|
4
|
+
mkdirSync,
|
|
5
|
+
existsSync,
|
|
6
|
+
readFileSync,
|
|
7
|
+
writeFileSync,
|
|
8
|
+
} from 'node:fs';
|
|
9
|
+
import { tmpdir } from 'node:os';
|
|
10
|
+
import { join } from 'node:path';
|
|
11
|
+
import { test } from 'node:test';
|
|
12
|
+
import { openTaskStore, STATUS } from '../task-store.mjs';
|
|
13
|
+
|
|
14
|
+
// A temp project with a .git marker, so the store anchors its .ai/tasks/ there.
|
|
15
|
+
function makeProject() {
|
|
16
|
+
const project = mkdtempSync(join(tmpdir(), 'task-store-'));
|
|
17
|
+
mkdirSync(join(project, '.git'));
|
|
18
|
+
return project;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function sampleTask(id) {
|
|
22
|
+
return {
|
|
23
|
+
id,
|
|
24
|
+
title: `task ${id}`,
|
|
25
|
+
description: 'desc',
|
|
26
|
+
status: STATUS.OPEN,
|
|
27
|
+
size: 'trivial',
|
|
28
|
+
createdAt: new Date().toISOString(),
|
|
29
|
+
messages: [],
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
test('openTaskStore anchors at the nearest project marker (.ai/ counts, not only .git)', () => {
|
|
34
|
+
// A project rooted only by .ai/ (no .git) must still resolve — the repo-less case.
|
|
35
|
+
const project = mkdtempSync(join(tmpdir(), 'ai-only-'));
|
|
36
|
+
mkdirSync(join(project, '.ai'));
|
|
37
|
+
const nested = join(project, 'src', 'deep');
|
|
38
|
+
mkdirSync(nested, { recursive: true });
|
|
39
|
+
const store = openTaskStore(nested);
|
|
40
|
+
assert.ok(
|
|
41
|
+
store,
|
|
42
|
+
'store resolves from a nested dir under an .ai/-rooted project',
|
|
43
|
+
);
|
|
44
|
+
assert.equal(store.root, project);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
test('add and active: a new task shows up in active', () => {
|
|
48
|
+
const store = openTaskStore(makeProject());
|
|
49
|
+
store.add(sampleTask('t1'));
|
|
50
|
+
const active = store.active();
|
|
51
|
+
assert.equal(active.length, 1);
|
|
52
|
+
assert.equal(active[0].id, 't1');
|
|
53
|
+
assert.deepEqual(store.history(), []);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test('update merges fields into the active task', () => {
|
|
57
|
+
const store = openTaskStore(makeProject());
|
|
58
|
+
store.add(sampleTask('t1'));
|
|
59
|
+
store.update('t1', { status: STATUS.BLOCKED, note: 'waiting' });
|
|
60
|
+
const task = store.active()[0];
|
|
61
|
+
assert.equal(task.status, STATUS.BLOCKED);
|
|
62
|
+
assert.equal(task.note, 'waiting');
|
|
63
|
+
assert.equal(store.update('missing', {}), null);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
test('close MOVES a task from active to history, never deletes', () => {
|
|
67
|
+
const store = openTaskStore(makeProject());
|
|
68
|
+
store.add(sampleTask('t1'));
|
|
69
|
+
store.add(sampleTask('t2'));
|
|
70
|
+
|
|
71
|
+
const { task: closed } = store.close('t1', STATUS.DONE, {
|
|
72
|
+
reason: 'finished',
|
|
73
|
+
evidence: 'npm test -> 12 passing',
|
|
74
|
+
});
|
|
75
|
+
assert.equal(closed.status, STATUS.DONE);
|
|
76
|
+
assert.equal(closed.closeReason, 'finished');
|
|
77
|
+
assert.equal(closed.evidence, 'npm test -> 12 passing');
|
|
78
|
+
assert.ok(closed.closedAt);
|
|
79
|
+
|
|
80
|
+
assert.deepEqual(
|
|
81
|
+
store.active().map((task) => task.id),
|
|
82
|
+
['t2'],
|
|
83
|
+
);
|
|
84
|
+
assert.deepEqual(
|
|
85
|
+
store.history().map((task) => task.id),
|
|
86
|
+
['t1'],
|
|
87
|
+
);
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
test('closing as done WITHOUT evidence is refused; the task stays active', () => {
|
|
91
|
+
const store = openTaskStore(makeProject());
|
|
92
|
+
store.add(sampleTask('t1'));
|
|
93
|
+
const result = store.close('t1', STATUS.DONE, { reason: 'trust me' });
|
|
94
|
+
assert.ok(result.error, 'done without evidence must return an error');
|
|
95
|
+
assert.match(result.error, /evidence/i);
|
|
96
|
+
assert.equal(store.active().length, 1, 'the task is not moved to history');
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
test('abandon is a terminal close: moves to history with reason, no evidence needed', () => {
|
|
100
|
+
const store = openTaskStore(makeProject());
|
|
101
|
+
store.add(sampleTask('t1'));
|
|
102
|
+
const { task } = store.close('t1', STATUS.ABANDONED, { reason: 'no longer needed' });
|
|
103
|
+
assert.equal(task.status, STATUS.ABANDONED);
|
|
104
|
+
assert.equal(store.active().length, 0);
|
|
105
|
+
assert.equal(store.history()[0].status, STATUS.ABANDONED);
|
|
106
|
+
assert.equal(store.history()[0].closeReason, 'no longer needed');
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
test('promoteToForge links a run and keeps the task active as in_forge', () => {
|
|
110
|
+
const store = openTaskStore(makeProject());
|
|
111
|
+
store.add(sampleTask('t1'));
|
|
112
|
+
const promoted = store.promoteToForge('t1', 'run-42');
|
|
113
|
+
assert.equal(promoted.status, STATUS.IN_FORGE);
|
|
114
|
+
assert.equal(promoted.forgeRunId, 'run-42');
|
|
115
|
+
assert.equal(store.active().length, 1, 'in_forge is still active, not closed');
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
test('close rejects a non-terminal status and an unknown id', () => {
|
|
119
|
+
const store = openTaskStore(makeProject());
|
|
120
|
+
store.add(sampleTask('t1'));
|
|
121
|
+
assert.ok(store.close('t1', STATUS.OPEN, { reason: 'x' }).error);
|
|
122
|
+
assert.ok(store.close('missing', STATUS.DONE, { evidence: 'x' }).error);
|
|
123
|
+
assert.equal(store.active().length, 1);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
test('counter persists and reads back', () => {
|
|
127
|
+
const store = openTaskStore(makeProject());
|
|
128
|
+
assert.equal(store.counter(), 0);
|
|
129
|
+
store.setCounter(7);
|
|
130
|
+
assert.equal(store.counter(), 7);
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
test('history is append-only across multiple closes', () => {
|
|
134
|
+
const store = openTaskStore(makeProject());
|
|
135
|
+
store.add(sampleTask('t1'));
|
|
136
|
+
store.add(sampleTask('t2'));
|
|
137
|
+
store.close('t1', STATUS.DONE, { reason: 'a', evidence: 'tests green' });
|
|
138
|
+
store.close('t2', STATUS.ABANDONED, { reason: 'b' });
|
|
139
|
+
assert.deepEqual(
|
|
140
|
+
store.history().map((task) => task.id),
|
|
141
|
+
['t1', 't2'],
|
|
142
|
+
);
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
test('a corrupt active.json is treated as empty, then healed by a write', () => {
|
|
146
|
+
const project = makeProject();
|
|
147
|
+
const store = openTaskStore(project);
|
|
148
|
+
mkdirSync(join(project, '.ai', 'tasks'), { recursive: true });
|
|
149
|
+
const path = join(project, '.ai', 'tasks', 'active.json');
|
|
150
|
+
writeFileSync(path, '{broken');
|
|
151
|
+
assert.deepEqual(store.active(), []);
|
|
152
|
+
store.add(sampleTask('t1'));
|
|
153
|
+
assert.ok(existsSync(path));
|
|
154
|
+
assert.equal(JSON.parse(readFileSync(path, 'utf8')).tasks.length, 1);
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
test('a UTF-8 BOM on active.json/counter.json does not make the store treat them as empty/corrupt', () => {
|
|
158
|
+
const project = makeProject();
|
|
159
|
+
const tasksDir = join(project, '.ai', 'tasks');
|
|
160
|
+
mkdirSync(tasksDir, { recursive: true });
|
|
161
|
+
|
|
162
|
+
const bom = '';
|
|
163
|
+
writeFileSync(
|
|
164
|
+
join(tasksDir, 'active.json'),
|
|
165
|
+
bom + JSON.stringify({ tasks: [sampleTask('t1')] }),
|
|
166
|
+
);
|
|
167
|
+
writeFileSync(join(tasksDir, 'counter.json'), bom + JSON.stringify({ count: 3 }));
|
|
168
|
+
|
|
169
|
+
const store = openTaskStore(project);
|
|
170
|
+
assert.deepEqual(
|
|
171
|
+
store.active().map((task) => task.id),
|
|
172
|
+
['t1'],
|
|
173
|
+
'a BOM-prefixed active.json must still be read as its real content, not as empty',
|
|
174
|
+
);
|
|
175
|
+
assert.equal(
|
|
176
|
+
store.counter(),
|
|
177
|
+
3,
|
|
178
|
+
'a BOM-prefixed counter.json must still be read as its real value, not 0',
|
|
179
|
+
);
|
|
180
|
+
});
|