Skip to content

Commit 907fc76

Browse files
fix: remove version from snapshot
1 parent 3cc5081 commit 907fc76

19 files changed

Lines changed: 51 additions & 30 deletions

packages/cddl2py/tests/__snapshots__/complex_types.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`complex types conversion > should include all types in the union (Pydantic) 1`] = `
4-
"# compiled with https://www.npmjs.com/package/cddl2py v0.1.0
4+
"# compiled with https://www.npmjs.com/package/cddl2py
55
66
from __future__ import annotations
77
@@ -41,7 +41,7 @@ ListLocalValue = list[LocalValue]
4141
`;
4242

4343
exports[`complex types conversion > should include all types in the union (TypedDict) 1`] = `
44-
"# compiled with https://www.npmjs.com/package/cddl2py v0.1.0
44+
"# compiled with https://www.npmjs.com/package/cddl2py
4545
4646
from __future__ import annotations
4747

packages/cddl2py/tests/__snapshots__/group_choice.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`group choice conversion > should generate a union type for multiple group choices (Pydantic) 1`] = `
4-
"# compiled with https://www.npmjs.com/package/cddl2py v0.1.0
4+
"# compiled with https://www.npmjs.com/package/cddl2py
55
66
from __future__ import annotations
77
@@ -64,7 +64,7 @@ GroupChoiceMulti = Union[dict[str, Any], dict[str, Any], dict[str, Any]]
6464
`;
6565

6666
exports[`group choice conversion > should generate a union type for multiple group choices (TypedDict) 1`] = `
67-
"# compiled with https://www.npmjs.com/package/cddl2py v0.1.0
67+
"# compiled with https://www.npmjs.com/package/cddl2py
6868
6969
from __future__ import annotations
7070

packages/cddl2py/tests/__snapshots__/literals.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`literals > should support bigint and null literals 1`] = `
4-
"# compiled with https://www.npmjs.com/package/cddl2py v0.1.0
4+
"# compiled with https://www.npmjs.com/package/cddl2py
55
66
from __future__ import annotations
77

packages/cddl2py/tests/__snapshots__/mixin_union.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`mixin and union conversion > should generate union type aliases for mixin choices (Pydantic) 1`] = `
4-
"# compiled with https://www.npmjs.com/package/cddl2py v0.1.0
4+
"# compiled with https://www.npmjs.com/package/cddl2py
55
66
from __future__ import annotations
77
@@ -33,7 +33,7 @@ ComplexMixins = Union[_ComplexMixinsVariant0, _ComplexMixinsVariant1]
3333
`;
3434

3535
exports[`mixin and union conversion > should generate union type aliases for mixin choices (TypedDict) 1`] = `
36-
"# compiled with https://www.npmjs.com/package/cddl2py v0.1.0
36+
"# compiled with https://www.npmjs.com/package/cddl2py
3737
3838
from __future__ import annotations
3939

packages/cddl2py/tests/__snapshots__/mod.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`cddl2py CLI > should generate correct pydantic types for test.cddl 1`] = `
44
[
55
[
6-
"# compiled with https://www.npmjs.com/package/cddl2py v0.1.0
6+
"# compiled with https://www.npmjs.com/package/cddl2py
77
88
from __future__ import annotations
99
@@ -75,7 +75,7 @@ ScriptMappingLocalValue = list[Union["ScriptLocalValue", str]]
7575
exports[`cddl2py CLI > should generate correct types for test.cddl 1`] = `
7676
[
7777
[
78-
"# compiled with https://www.npmjs.com/package/cddl2py v0.1.0
78+
"# compiled with https://www.npmjs.com/package/cddl2py
7979
8080
from __future__ import annotations
8181

packages/cddl2py/tests/__snapshots__/named_group_choice.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`named group choice > should generate a union type alias for named group references (Pydantic) 1`] = `
4-
"# compiled with https://www.npmjs.com/package/cddl2py v0.1.0
4+
"# compiled with https://www.npmjs.com/package/cddl2py
55
66
from __future__ import annotations
77
@@ -19,7 +19,7 @@ Choice = Union[OptionA, OptionB]
1919
`;
2020

2121
exports[`named group choice > should generate a union type alias for named group references (TypedDict) 1`] = `
22-
"# compiled with https://www.npmjs.com/package/cddl2py v0.1.0
22+
"# compiled with https://www.npmjs.com/package/cddl2py
2323
2424
from __future__ import annotations
2525

packages/cddl2py/tests/__snapshots__/transform.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`transform > snapshot tests with parsed CDDL > should transform test.cddl Pydantic correctly 1`] = `
4-
"# compiled with https://www.npmjs.com/package/cddl2py v0.0.1
4+
"# compiled with https://www.npmjs.com/package/cddl2py
55
66
from __future__ import annotations
77
@@ -69,7 +69,7 @@ ScriptMappingLocalValue = list[Union["ScriptLocalValue", str]]
6969
`;
7070

7171
exports[`transform > snapshot tests with parsed CDDL > should transform test.cddl TypedDict correctly 1`] = `
72-
"# compiled with https://www.npmjs.com/package/cddl2py v0.0.1
72+
"# compiled with https://www.npmjs.com/package/cddl2py
7373
7474
from __future__ import annotations
7575

packages/cddl2py/tests/__snapshots__/webdriver_local.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`webdriver local spec > should generate Python types for webdriver local spec 1`] = `
4-
"# compiled with https://www.npmjs.com/package/cddl2py v0.1.0
4+
"# compiled with https://www.npmjs.com/package/cddl2py
55
66
from __future__ import annotations
77

packages/cddl2py/tests/__snapshots__/webdriver_remote.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`webdriver remote spec > should generate Python types for remote.cddl 1`] = `
4-
"# compiled with https://www.npmjs.com/package/cddl2py v0.1.0
4+
"# compiled with https://www.npmjs.com/package/cddl2py
55
66
from __future__ import annotations
77

packages/cddl2py/tests/complex_types.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import path from 'node:path'
33
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
44

55
import cli from '../src/cli.js'
6+
import { normalizeSnapshotOutput } from './snapshot.js'
67

78
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
89
const cddlFile = path.join(__dirname, '..', '..', '..', 'examples', 'commons', 'complex_types.cddl')
@@ -68,7 +69,7 @@ describe('complex types conversion', () => {
6869
expect(output).toContain('SetLocalValue')
6970

7071
expect(output).toContain('LocalValue = Union["ArrayLocalValue", "DateLocalValue", "MapLocalValue", "ObjectLocalValue", "RegExpLocalValue", "SetLocalValue"]')
71-
expect(output).toMatchSnapshot()
72+
expect(normalizeSnapshotOutput(output)).toMatchSnapshot()
7273
})
7374

7475
it('should include all types in the union (Pydantic)', async () => {
@@ -87,6 +88,6 @@ describe('complex types conversion', () => {
8788
expect(output).toContain('SetLocalValue')
8889

8990
expect(output).toContain('LocalValue = Union["ArrayLocalValue", "DateLocalValue", "MapLocalValue", "ObjectLocalValue", "RegExpLocalValue", "SetLocalValue"]')
90-
expect(output).toMatchSnapshot()
91+
expect(normalizeSnapshotOutput(output)).toMatchSnapshot()
9192
})
9293
})

0 commit comments

Comments
 (0)