@vltpkg/query 1.4.0 → 1.6.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.
Files changed (213) hide show
  1. package/dist/index.d.ts +7 -2
  2. package/dist/index.js +23 -4
  3. package/dist/pseudo/skill.d.ts +7 -0
  4. package/dist/pseudo/skill.js +52 -0
  5. package/dist/pseudo/skills.d.ts +6 -0
  6. package/dist/pseudo/skills.js +26 -0
  7. package/dist/pseudo.js +7 -0
  8. package/dist/types.d.ts +29 -1
  9. package/package.json +10 -12
  10. package/skills/dss-query/REFERENCE.md +0 -123
  11. package/skills/dss-query/SKILL.md +0 -190
  12. package/skills/dss-query/evals/README.md +0 -81
  13. package/skills/dss-query/evals/evals.json +0 -89
  14. package/skills/dss-query/evals/grade.mjs +0 -481
  15. package/src/attribute.ts +0 -190
  16. package/src/combinator.ts +0 -135
  17. package/src/error.ts +0 -78
  18. package/src/id.ts +0 -46
  19. package/src/index.ts +0 -640
  20. package/src/parser.ts +0 -122
  21. package/src/pseudo/abandoned.ts +0 -9
  22. package/src/pseudo/attr.ts +0 -92
  23. package/src/pseudo/built.ts +0 -19
  24. package/src/pseudo/confused.ts +0 -29
  25. package/src/pseudo/cve.ts +0 -93
  26. package/src/pseudo/cwe.ts +0 -97
  27. package/src/pseudo/debug.ts +0 -9
  28. package/src/pseudo/deprecated.ts +0 -9
  29. package/src/pseudo/dev.ts +0 -18
  30. package/src/pseudo/diff.ts +0 -90
  31. package/src/pseudo/dist.ts +0 -148
  32. package/src/pseudo/dynamic.ts +0 -9
  33. package/src/pseudo/empty.ts +0 -15
  34. package/src/pseudo/entropic.ts +0 -9
  35. package/src/pseudo/env.ts +0 -6
  36. package/src/pseudo/eval.ts +0 -9
  37. package/src/pseudo/fs.ts +0 -9
  38. package/src/pseudo/helpers.ts +0 -106
  39. package/src/pseudo/host.ts +0 -111
  40. package/src/pseudo/hostname.ts +0 -156
  41. package/src/pseudo/license.ts +0 -134
  42. package/src/pseudo/link.ts +0 -30
  43. package/src/pseudo/malware.ts +0 -41
  44. package/src/pseudo/minified.ts +0 -9
  45. package/src/pseudo/missing.ts +0 -16
  46. package/src/pseudo/native.ts +0 -9
  47. package/src/pseudo/network.ts +0 -9
  48. package/src/pseudo/obfuscated.ts +0 -9
  49. package/src/pseudo/optional.ts +0 -18
  50. package/src/pseudo/outdated.ts +0 -345
  51. package/src/pseudo/overridden.ts +0 -20
  52. package/src/pseudo/path.ts +0 -146
  53. package/src/pseudo/peer.ts +0 -18
  54. package/src/pseudo/prerelease.ts +0 -47
  55. package/src/pseudo/private.ts +0 -19
  56. package/src/pseudo/prod.ts +0 -18
  57. package/src/pseudo/published.ts +0 -250
  58. package/src/pseudo/registry.ts +0 -29
  59. package/src/pseudo/root.ts +0 -19
  60. package/src/pseudo/scanned.ts +0 -20
  61. package/src/pseudo/score.ts +0 -186
  62. package/src/pseudo/scripts.ts +0 -61
  63. package/src/pseudo/semver.ts +0 -320
  64. package/src/pseudo/severity.ts +0 -231
  65. package/src/pseudo/shell.ts +0 -9
  66. package/src/pseudo/shrinkwrap.ts +0 -9
  67. package/src/pseudo/spec.ts +0 -131
  68. package/src/pseudo/squat.ts +0 -225
  69. package/src/pseudo/suspicious.ts +0 -9
  70. package/src/pseudo/tracker.ts +0 -9
  71. package/src/pseudo/trivial.ts +0 -9
  72. package/src/pseudo/type.ts +0 -26
  73. package/src/pseudo/undesirable.ts +0 -9
  74. package/src/pseudo/unknown.ts +0 -9
  75. package/src/pseudo/unmaintained.ts +0 -9
  76. package/src/pseudo/unpopular.ts +0 -9
  77. package/src/pseudo/unstable.ts +0 -9
  78. package/src/pseudo/vuln.ts +0 -273
  79. package/src/pseudo/workspace.ts +0 -22
  80. package/src/pseudo.ts +0 -433
  81. package/src/types.ts +0 -176
  82. package/tap-snapshots/test/attribute.ts.test.cjs +0 -304
  83. package/tap-snapshots/test/combinator.ts.test.cjs +0 -333
  84. package/tap-snapshots/test/id.ts.test.cjs +0 -118
  85. package/tap-snapshots/test/parser.ts.test.cjs +0 -344
  86. package/tap-snapshots/test/pseudo/abandoned.ts.test.cjs +0 -18
  87. package/tap-snapshots/test/pseudo/attr.ts.test.cjs +0 -161
  88. package/tap-snapshots/test/pseudo/built.ts.test.cjs +0 -70
  89. package/tap-snapshots/test/pseudo/confused.ts.test.cjs +0 -32
  90. package/tap-snapshots/test/pseudo/cve.ts.test.cjs +0 -49
  91. package/tap-snapshots/test/pseudo/cwe.ts.test.cjs +0 -49
  92. package/tap-snapshots/test/pseudo/debug.ts.test.cjs +0 -18
  93. package/tap-snapshots/test/pseudo/deprecated.ts.test.cjs +0 -18
  94. package/tap-snapshots/test/pseudo/dist.ts.test.cjs +0 -30
  95. package/tap-snapshots/test/pseudo/dynamic.ts.test.cjs +0 -18
  96. package/tap-snapshots/test/pseudo/empty.ts.test.cjs +0 -50
  97. package/tap-snapshots/test/pseudo/entropic.ts.test.cjs +0 -18
  98. package/tap-snapshots/test/pseudo/env.ts.test.cjs +0 -18
  99. package/tap-snapshots/test/pseudo/eval.ts.test.cjs +0 -18
  100. package/tap-snapshots/test/pseudo/fs.ts.test.cjs +0 -18
  101. package/tap-snapshots/test/pseudo/helpers.ts.test.cjs +0 -18
  102. package/tap-snapshots/test/pseudo/hostname.ts.test.cjs +0 -148
  103. package/tap-snapshots/test/pseudo/license.ts.test.cjs +0 -41
  104. package/tap-snapshots/test/pseudo/link.ts.test.cjs +0 -36
  105. package/tap-snapshots/test/pseudo/malware.ts.test.cjs +0 -22
  106. package/tap-snapshots/test/pseudo/minified.ts.test.cjs +0 -18
  107. package/tap-snapshots/test/pseudo/missing.ts.test.cjs +0 -30
  108. package/tap-snapshots/test/pseudo/native.ts.test.cjs +0 -18
  109. package/tap-snapshots/test/pseudo/network.ts.test.cjs +0 -18
  110. package/tap-snapshots/test/pseudo/obfuscated.ts.test.cjs +0 -18
  111. package/tap-snapshots/test/pseudo/outdated.ts.test.cjs +0 -132
  112. package/tap-snapshots/test/pseudo/overridden.ts.test.cjs +0 -75
  113. package/tap-snapshots/test/pseudo/prerelease.ts.test.cjs +0 -101
  114. package/tap-snapshots/test/pseudo/private.ts.test.cjs +0 -38
  115. package/tap-snapshots/test/pseudo/published.ts.test.cjs +0 -171
  116. package/tap-snapshots/test/pseudo/registry.ts.test.cjs +0 -68
  117. package/tap-snapshots/test/pseudo/root.ts.test.cjs +0 -24
  118. package/tap-snapshots/test/pseudo/scanned.ts.test.cjs +0 -18
  119. package/tap-snapshots/test/pseudo/score.ts.test.cjs +0 -239
  120. package/tap-snapshots/test/pseudo/scripts.ts.test.cjs +0 -62
  121. package/tap-snapshots/test/pseudo/semver.ts.test.cjs +0 -575
  122. package/tap-snapshots/test/pseudo/severity.ts.test.cjs +0 -122
  123. package/tap-snapshots/test/pseudo/shell.ts.test.cjs +0 -18
  124. package/tap-snapshots/test/pseudo/shrinkwrap.ts.test.cjs +0 -18
  125. package/tap-snapshots/test/pseudo/spec.ts.test.cjs +0 -148
  126. package/tap-snapshots/test/pseudo/squat.ts.test.cjs +0 -129
  127. package/tap-snapshots/test/pseudo/suspicious.ts.test.cjs +0 -18
  128. package/tap-snapshots/test/pseudo/tracker.ts.test.cjs +0 -18
  129. package/tap-snapshots/test/pseudo/trivial.ts.test.cjs +0 -18
  130. package/tap-snapshots/test/pseudo/type.ts.test.cjs +0 -51
  131. package/tap-snapshots/test/pseudo/undesirable.ts.test.cjs +0 -18
  132. package/tap-snapshots/test/pseudo/unknown.ts.test.cjs +0 -18
  133. package/tap-snapshots/test/pseudo/unmaintained.ts.test.cjs +0 -18
  134. package/tap-snapshots/test/pseudo/unpopular.ts.test.cjs +0 -18
  135. package/tap-snapshots/test/pseudo/unstable.ts.test.cjs +0 -18
  136. package/tap-snapshots/test/pseudo/vuln.ts.test.cjs +0 -208
  137. package/tap-snapshots/test/pseudo/vulnerable.ts.test.cjs +0 -20
  138. package/tap-snapshots/test/pseudo/workspace.ts.test.cjs +0 -19
  139. package/tap-snapshots/test/pseudo.ts.test.cjs +0 -1247
  140. package/test/attribute.ts +0 -273
  141. package/test/combinator.ts +0 -175
  142. package/test/error.ts +0 -60
  143. package/test/fixtures/graph.ts +0 -999
  144. package/test/fixtures/selector.ts +0 -103
  145. package/test/fixtures/types.ts +0 -7
  146. package/test/id.ts +0 -102
  147. package/test/index.ts +0 -1049
  148. package/test/parser.ts +0 -117
  149. package/test/pseudo/abandoned.ts +0 -98
  150. package/test/pseudo/attr.ts +0 -298
  151. package/test/pseudo/built.ts +0 -214
  152. package/test/pseudo/confused.ts +0 -160
  153. package/test/pseudo/cve.ts +0 -249
  154. package/test/pseudo/cwe.ts +0 -255
  155. package/test/pseudo/debug.ts +0 -98
  156. package/test/pseudo/deprecated.ts +0 -98
  157. package/test/pseudo/dev.ts +0 -61
  158. package/test/pseudo/diff.ts +0 -417
  159. package/test/pseudo/dist.ts +0 -215
  160. package/test/pseudo/dynamic.ts +0 -98
  161. package/test/pseudo/empty.ts +0 -108
  162. package/test/pseudo/entropic.ts +0 -101
  163. package/test/pseudo/env.ts +0 -98
  164. package/test/pseudo/eval.ts +0 -98
  165. package/test/pseudo/fs.ts +0 -98
  166. package/test/pseudo/helpers.ts +0 -370
  167. package/test/pseudo/host-context.ts +0 -276
  168. package/test/pseudo/hostname.ts +0 -314
  169. package/test/pseudo/license.ts +0 -265
  170. package/test/pseudo/link.ts +0 -94
  171. package/test/pseudo/malware.ts +0 -184
  172. package/test/pseudo/minified.ts +0 -98
  173. package/test/pseudo/missing.ts +0 -111
  174. package/test/pseudo/native.ts +0 -98
  175. package/test/pseudo/network.ts +0 -98
  176. package/test/pseudo/obfuscated.ts +0 -98
  177. package/test/pseudo/optional.ts +0 -73
  178. package/test/pseudo/outdated.ts +0 -461
  179. package/test/pseudo/overridden.ts +0 -317
  180. package/test/pseudo/path.ts +0 -680
  181. package/test/pseudo/peer.ts +0 -101
  182. package/test/pseudo/prerelease.ts +0 -279
  183. package/test/pseudo/private.ts +0 -108
  184. package/test/pseudo/prod.ts +0 -61
  185. package/test/pseudo/published.ts +0 -557
  186. package/test/pseudo/registry.ts +0 -122
  187. package/test/pseudo/root.ts +0 -66
  188. package/test/pseudo/scanned.ts +0 -144
  189. package/test/pseudo/score.ts +0 -591
  190. package/test/pseudo/scripts.ts +0 -324
  191. package/test/pseudo/semver.ts +0 -822
  192. package/test/pseudo/severity.ts +0 -342
  193. package/test/pseudo/shell.ts +0 -98
  194. package/test/pseudo/shrinkwrap.ts +0 -98
  195. package/test/pseudo/spec.ts +0 -525
  196. package/test/pseudo/squat.ts +0 -565
  197. package/test/pseudo/suspicious.ts +0 -98
  198. package/test/pseudo/tracker.ts +0 -98
  199. package/test/pseudo/trivial.ts +0 -98
  200. package/test/pseudo/type.ts +0 -105
  201. package/test/pseudo/undesirable.ts +0 -98
  202. package/test/pseudo/unknown.ts +0 -98
  203. package/test/pseudo/unmaintained.ts +0 -98
  204. package/test/pseudo/unpopular.ts +0 -98
  205. package/test/pseudo/unstable.ts +0 -98
  206. package/test/pseudo/vuln.ts +0 -625
  207. package/test/pseudo/vulnerable.ts +0 -137
  208. package/test/pseudo/workspace.ts +0 -111
  209. package/test/pseudo.ts +0 -584
  210. package/tsconfig.json +0 -3
  211. package/tsconfig.publish.json +0 -19
  212. package/tsconfig.publish.tsbuildinfo +0 -1
  213. package/typedoc.mjs +0 -2
@@ -1,324 +0,0 @@
1
- import t from 'tap'
2
- import postcssSelectorParser from 'postcss-selector-parser'
3
- import { joinDepIDTuple } from '@vltpkg/dep-id'
4
- import { normalizeManifest } from '@vltpkg/types'
5
- import type { ParserState } from '../../src/types.ts'
6
- import { scripts } from '../../src/pseudo/scripts.ts'
7
- import { newGraph, newNode } from '../fixtures/graph.ts'
8
- import type { NodeLike } from '@vltpkg/types'
9
-
10
- t.test('selects packages that need to be built', async t => {
11
- const getState = (query: string, nodes: NodeLike[] = []) => {
12
- const ast = postcssSelectorParser().astSync(query)
13
- const current = ast.first.first
14
-
15
- // Create a minimal graph with our test nodes
16
- const graph = newGraph('test-project')
17
- nodes.forEach(node => {
18
- graph.nodes.set(node.id, node)
19
- })
20
-
21
- const state: ParserState = {
22
- comment: '',
23
- current,
24
- initial: {
25
- edges: new Set(graph.edges.values()),
26
- nodes: new Set(nodes),
27
- },
28
- partial: {
29
- edges: new Set(graph.edges.values()),
30
- nodes: new Set(nodes),
31
- },
32
- collect: {
33
- edges: new Set(),
34
- nodes: new Set(),
35
- },
36
- cancellable: async () => {},
37
- walk: async i => i,
38
- retries: 0,
39
- securityArchive: undefined,
40
- importers: new Set(graph.importers),
41
- signal: new AbortController().signal,
42
- specificity: { idCounter: 0, commonCounter: 0 },
43
- }
44
- return state
45
- }
46
-
47
- const createTestNode = (name: string, manifest: any): NodeLike => {
48
- const graph = newGraph('test')
49
- const addNode = newNode(graph)
50
- const node = addNode(name)
51
- node.manifest = normalizeManifest({
52
- name,
53
- version: '1.0.0',
54
- ...manifest,
55
- })
56
- return node
57
- }
58
-
59
- await t.test(
60
- 'selects nodes with install lifecycle scripts',
61
- async t => {
62
- const nodeWithInstall = createTestNode('install-pkg', {
63
- scripts: { install: 'echo installing' },
64
- })
65
- const nodeWithPreinstall = createTestNode('preinstall-pkg', {
66
- scripts: { preinstall: 'echo pre installing' },
67
- })
68
- const nodeWithPostinstall = createTestNode('postinstall-pkg', {
69
- scripts: { postinstall: 'echo post installing' },
70
- })
71
- const nodeWithoutScripts = createTestNode('no-scripts-pkg', {})
72
- // abbreviated registry manifest: no scripts, only the flag
73
- const nodeWithFlag = createTestNode('abbreviated-pkg', {
74
- hasInstallScript: true,
75
- })
76
-
77
- const res = await scripts(
78
- getState(':scripts', [
79
- nodeWithInstall,
80
- nodeWithPreinstall,
81
- nodeWithPostinstall,
82
- nodeWithoutScripts,
83
- nodeWithFlag,
84
- ]),
85
- )
86
-
87
- t.strictSame(
88
- [...res.partial.nodes].map(n => n.name).sort(),
89
- [
90
- 'abbreviated-pkg',
91
- 'install-pkg',
92
- 'postinstall-pkg',
93
- 'preinstall-pkg',
94
- ],
95
- 'should select packages with install lifecycle scripts',
96
- )
97
- t.matchSnapshot({
98
- nodes: [...res.partial.nodes].map(n => n.name).sort(),
99
- edges: [...res.partial.edges].map(e => e.name).sort(),
100
- })
101
- },
102
- )
103
-
104
- await t.test(
105
- 'selects git dependencies with prepare scripts',
106
- async t => {
107
- const gitNodeWithPrepare = createTestNode('git-pkg', {
108
- scripts: { prepare: 'npm run build' },
109
- })
110
- gitNodeWithPrepare.id = joinDepIDTuple([
111
- 'git',
112
- 'github.com/user/repo.git',
113
- 'git-pkg@1.0.0',
114
- ])
115
-
116
- const gitNodeWithPreprepare = createTestNode(
117
- 'git-preprepare-pkg',
118
- {
119
- scripts: { preprepare: 'npm run setup' },
120
- },
121
- )
122
- gitNodeWithPreprepare.id = joinDepIDTuple([
123
- 'git',
124
- 'github.com/user/repo2.git',
125
- 'git-preprepare-pkg@1.0.0',
126
- ])
127
-
128
- const gitNodeWithPostprepare = createTestNode(
129
- 'git-postprepare-pkg',
130
- {
131
- scripts: { postprepare: 'npm run cleanup' },
132
- },
133
- )
134
- gitNodeWithPostprepare.id = joinDepIDTuple([
135
- 'git',
136
- 'github.com/user/repo3.git',
137
- 'git-postprepare-pkg@1.0.0',
138
- ])
139
-
140
- const gitNodeWithoutPrepare = createTestNode(
141
- 'git-no-prepare-pkg',
142
- {},
143
- )
144
- gitNodeWithoutPrepare.id = joinDepIDTuple([
145
- 'git',
146
- 'github.com/user/repo4.git',
147
- 'git-no-prepare-pkg@1.0.0',
148
- ])
149
-
150
- const res = await scripts(
151
- getState(':scripts', [
152
- gitNodeWithPrepare,
153
- gitNodeWithPreprepare,
154
- gitNodeWithPostprepare,
155
- gitNodeWithoutPrepare,
156
- ]),
157
- )
158
-
159
- t.strictSame(
160
- [...res.partial.nodes].map(n => n.name).sort(),
161
- ['git-pkg', 'git-postprepare-pkg', 'git-preprepare-pkg'],
162
- 'should select git packages with prepare scripts',
163
- )
164
- t.matchSnapshot({
165
- nodes: [...res.partial.nodes].map(n => n.name).sort(),
166
- edges: [...res.partial.edges].map(e => e.name).sort(),
167
- })
168
- },
169
- )
170
-
171
- await t.test(
172
- 'selects importer nodes with prepare scripts',
173
- async t => {
174
- const importerNodeWithPrepare = createTestNode('importer-pkg', {
175
- scripts: { prepare: 'npm run build' },
176
- })
177
- importerNodeWithPrepare.importer = true
178
-
179
- const importerNodeWithoutPrepare = createTestNode(
180
- 'importer-no-prepare-pkg',
181
- {},
182
- )
183
- importerNodeWithoutPrepare.importer = true
184
-
185
- const regularNodeWithPrepare = createTestNode('regular-pkg', {
186
- scripts: { prepare: 'npm run build' },
187
- })
188
- // Add mock inVltStore method that returns true for regular nodes
189
- ;(regularNodeWithPrepare as any).inVltStore = () => true
190
-
191
- const res = await scripts(
192
- getState(':scripts', [
193
- importerNodeWithPrepare,
194
- importerNodeWithoutPrepare,
195
- regularNodeWithPrepare,
196
- ]),
197
- )
198
-
199
- t.strictSame(
200
- [...res.partial.nodes].map(n => n.name).sort(),
201
- ['importer-pkg'],
202
- 'should select importer packages with prepare scripts but not regular packages in vlt store',
203
- )
204
- t.matchSnapshot({
205
- nodes: [...res.partial.nodes].map(n => n.name).sort(),
206
- edges: [...res.partial.edges].map(e => e.name).sort(),
207
- })
208
- },
209
- )
210
-
211
- await t.test(
212
- 'filters out nodes without build requirements',
213
- async t => {
214
- const nodeWithoutManifest = createTestNode(
215
- 'no-manifest-pkg',
216
- {},
217
- )
218
- delete nodeWithoutManifest.manifest
219
-
220
- const nodeWithEmptyManifest = createTestNode(
221
- 'empty-manifest-pkg',
222
- {},
223
- )
224
-
225
- const nodeWithOnlyDevScripts = createTestNode(
226
- 'dev-scripts-pkg',
227
- {
228
- scripts: {
229
- dev: 'webpack serve',
230
- test: 'jest',
231
- },
232
- },
233
- )
234
-
235
- const res = await scripts(
236
- getState(':scripts', [
237
- nodeWithoutManifest,
238
- nodeWithEmptyManifest,
239
- nodeWithOnlyDevScripts,
240
- ]),
241
- )
242
-
243
- t.strictSame(
244
- [...res.partial.nodes].map(n => n.name).sort(),
245
- [],
246
- 'should filter out packages that do not need building',
247
- )
248
- t.matchSnapshot({
249
- nodes: [...res.partial.nodes].map(n => n.name).sort(),
250
- edges: [...res.partial.edges].map(e => e.name).sort(),
251
- })
252
- },
253
- )
254
-
255
- await t.test('selects nodes marked as needing a build', async t => {
256
- // binding.gyp only: no scripts in package.json
257
- const gyp = createTestNode('gyp-pkg', {})
258
- gyp.buildState = 'needed'
259
- const noManifest = createTestNode('no-manifest-pkg', {})
260
- delete noManifest.manifest
261
- noManifest.buildState = 'needed'
262
- const built = createTestNode('built-pkg', {})
263
- built.buildState = 'built'
264
-
265
- const res = await scripts(
266
- getState(':scripts', [gyp, noManifest, built]),
267
- )
268
-
269
- t.strictSame([...res.partial.nodes].map(n => n.name).sort(), [
270
- 'gyp-pkg',
271
- 'no-manifest-pkg',
272
- ])
273
- })
274
-
275
- await t.test('handles mixed scenarios correctly', async t => {
276
- const nodeNeedingBuild1 = createTestNode('build-pkg1', {
277
- scripts: { install: 'make install' },
278
- })
279
-
280
- const nodeNeedingBuild2 = createTestNode('build-pkg2', {
281
- scripts: { prepare: 'npm run compile' },
282
- })
283
- nodeNeedingBuild2.importer = true
284
-
285
- const nodeNotNeedingBuild = createTestNode('no-build-pkg', {
286
- scripts: { start: 'node server.js' },
287
- })
288
-
289
- const res = await scripts(
290
- getState(':scripts', [
291
- nodeNeedingBuild1,
292
- nodeNeedingBuild2,
293
- nodeNotNeedingBuild,
294
- ]),
295
- )
296
-
297
- t.strictSame(
298
- [...res.partial.nodes].map(n => n.name).sort(),
299
- ['build-pkg1', 'build-pkg2'],
300
- 'should correctly handle mixed build scenarios',
301
- )
302
- t.matchSnapshot({
303
- nodes: [...res.partial.nodes].map(n => n.name).sort(),
304
- edges: [...res.partial.edges].map(e => e.name).sort(),
305
- })
306
- })
307
-
308
- await t.test('handles empty partial state', async t => {
309
- const state = getState(':scripts')
310
- state.partial.nodes.clear()
311
- state.partial.edges.clear()
312
-
313
- const res = await scripts(state)
314
- t.strictSame(
315
- [...res.partial.nodes].map(n => n.name),
316
- [],
317
- 'should return empty array when starting with empty partial state',
318
- )
319
- t.matchSnapshot({
320
- nodes: [...res.partial.nodes].map(n => n.name),
321
- edges: [...res.partial.edges].map(e => e.name),
322
- })
323
- })
324
- })