Skip to content

Commit

Permalink
Manual fixes for tests that didn't get changed
Browse files Browse the repository at this point in the history
  • Loading branch information
yeoffrey committed Dec 3, 2024
1 parent a3c13b5 commit f743dfa
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
21 changes: 15 additions & 6 deletions test/validation/map/valid-opaque.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
import { assert } from '../../../src'
import { expect, test } from 'vitest'
import { map } from '../../../src'

export const Struct = map()
test('Valid map opaque', () => {
const data = new Map([
['a', 1],
[2, true],
] as any)

export const data = new Map([
['a', 1],
[2, true],
] as any)
assert(data, map())

export const output = data
expect(data).toStrictEqual(
new Map([
['a', 1],
[2, true],
] as any)
)
})
17 changes: 12 additions & 5 deletions test/validation/type/valid-instance.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { assert } from '../../../src'
import { expect, test } from 'vitest'
import { type, string } from '../../../src'

class Person {
Expand All @@ -8,10 +10,15 @@ class Person {
}
}

export const Struct = type({
name: string(),
})
test('Valid type instance', () => {
const data = new Person('john')

export const data = new Person('john')
assert(
data,
type({
name: string(),
})
)

export const output = data
expect(data).toStrictEqual(new Person('john'))
})

0 comments on commit f743dfa

Please sign in to comment.