Skip to content

Commit

Permalink
chore: Update vitest (#4721)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S authored Aug 15, 2023
1 parent 584fa1b commit ae24cf8
Show file tree
Hide file tree
Showing 7 changed files with 156 additions and 205 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"@types/node": "^18.17.5",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@vitest/coverage-istanbul": "^0.31.4",
"@vitest/coverage-istanbul": "^0.34.1",
"ajv-cli": "^5.0.0",
"conventional-changelog-conventionalcommits": "^6.1.0",
"eslint": "^8.47.0",
Expand All @@ -123,6 +123,6 @@
"tslib": "^2.6.1",
"typescript": "^5.1.6",
"vite": "^4.4.9",
"vitest": "^0.31.4"
"vitest": "^0.34.1"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Validate weightedMaps > buildWeightMap pp { insDel: 11, swap: 4, …(2) }, { map: 'aeiou', replace: 4, insDel: 7 }, { map: 'aeiou', replace: 4, insDel: 7 } 1`] = `
exports[`Validate weightedMaps > buildWeightMap pp { Object (insDel, swap, ...) }, { map: 'aeiou', replace: 4, insDel: 7 }, { map: 'aeiou', replace: 4, insDel: 7 } 1`] = `
"InsDel:
(a) = 7
(e) = 7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ rk\\\\'#8e;<i#7c;<s$$4
"
`;
exports[`Import/Export > serialize DAWG { base: 10, …(1) } 1`] = `
exports[`Import/Export > serialize DAWG { Object (base, addLineBreaksToImproveDiffs) } 1`] = `
"#!/usr/bin/env cspell-trie reader
TrieXv3
base=10
Expand All @@ -163,7 +163,7 @@ wa#64;<2
"
`;
exports[`Import/Export > serialize DAWG { base: 10, …(1) } 2`] = `
exports[`Import/Export > serialize DAWG { Object (base, optimizeSimpleReferences) } 1`] = `
"#!/usr/bin/env cspell-trie reader
TrieXv3
base=10
Expand Down Expand Up @@ -219,7 +219,7 @@ a#64;<2
"
`;
exports[`Import/Export > serialize DAWG { base: 10, …(1) } 3`] = `
exports[`Import/Export > serialize DAWG { Object (base, optimizeSimpleReferences) } 2`] = `
"#!/usr/bin/env cspell-trie reader
TrieXv3
base=10
Expand Down Expand Up @@ -275,7 +275,7 @@ a#64;<2
"
`;
exports[`Import/Export > serialize DAWG { base: 10, …(2) } 1`] = `
exports[`Import/Export > serialize DAWG { Object (base, optimizeSimpleReferences, ...) } 1`] = `
"#!/usr/bin/env cspell-trie reader
TrieXv3
base=10
Expand All @@ -298,7 +298,7 @@ wa#64;<2
"
`;
exports[`Import/Export > serialize DAWG { base: 10, …(2) } 2`] = `
exports[`Import/Export > serialize DAWG { Object (base, optimizeSimpleReferences, ...) } 2`] = `
"#!/usr/bin/env cspell-trie reader
TrieXv3
base=10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ rk\\\\'@7<i@1<s$$4
"
`;
exports[`Import/Export > serialize DAWG { base: 10 } 1`] = `
exports[`Import/Export > serialize DAWG { Object (base, optimizeSimpleReferences) } 1`] = `
"#!/usr/bin/env cspell-trie reader
TrieXv4
base=10
Expand Down Expand Up @@ -395,7 +395,7 @@ a@7<2
"
`;
exports[`Import/Export > serialize DAWG { base: 10, …(1) } 1`] = `
exports[`Import/Export > serialize DAWG { Object (base, optimizeSimpleReferences) } 2`] = `
"#!/usr/bin/env cspell-trie reader
TrieXv4
base=10
Expand Down Expand Up @@ -486,7 +486,7 @@ a@7<2
"
`;
exports[`Import/Export > serialize DAWG { base: 10, …(1) } 2`] = `
exports[`Import/Export > serialize DAWG { base: 10 } 1`] = `
"#!/usr/bin/env cspell-trie reader
TrieXv4
base=10
Expand Down
120 changes: 60 additions & 60 deletions packages/cspell/src/app/__snapshots__/app.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1229,15 +1229,15 @@ exports[`Validate cli > app 'with spelling errors --debug Dutch.txt' Expect Erro
./samples/Dutch.txt:78:18 - Unknown word (ANBI)"
`;
exports[`Validate cli > app 'with spelling errors --silent Dutch.t…' Expect Error: [Function CheckFailed] 1`] = `[]`;
exports[`Validate cli > app 'with spelling errors --silent Dutch.txt' Expect Error: [Function CheckFailed] 1`] = `[]`;
exports[`Validate cli > app 'with spelling errors --silent Dutch.t…' Expect Error: [Function CheckFailed] 2`] = `""`;
exports[`Validate cli > app 'with spelling errors --silent Dutch.txt' Expect Error: [Function CheckFailed] 2`] = `""`;
exports[`Validate cli > app 'with spelling errors --silent Dutch.t…' Expect Error: [Function CheckFailed] 3`] = `""`;
exports[`Validate cli > app 'with spelling errors --silent Dutch.txt' Expect Error: [Function CheckFailed] 3`] = `""`;
exports[`Validate cli > app 'with spelling errors Dutch.txt --lega…' Expect Error: [Function CheckFailed] 1`] = `[]`;
exports[`Validate cli > app 'with spelling errors Dutch.txt --legacy' Expect Error: [Function CheckFailed] 1`] = `[]`;
exports[`Validate cli > app 'with spelling errors Dutch.txt --lega…' Expect Error: [Function CheckFailed] 2`] = `
exports[`Validate cli > app 'with spelling errors Dutch.txt --legacy' Expect Error: [Function CheckFailed] 2`] = `
"error 0.00ms X
log ./samples/Dutch.txt[1, 32]: Unknown word: NEDERLANDS
log ./samples/Dutch.txt[2, 11]: Unknown word: wordt
Expand Down Expand Up @@ -1431,14 +1431,14 @@ log ./samples/Dutch.txt[78, 18]: Unknown word: ANBI
error CSpell: Files checked: 1, Issues found: 189 in 1 files"
`;
exports[`Validate cli > app 'with spelling errors Dutch.txt --lega…' Expect Error: [Function CheckFailed] 3`] = `
exports[`Validate cli > app 'with spelling errors Dutch.txt --legacy' Expect Error: [Function CheckFailed] 3`] = `
"
1/1 ./samples/Dutch.txt"
`;
exports[`Validate cli > app 'with spelling errors Dutch.txt words ' Expect Error: [Function CheckFailed] 1`] = `[]`;
exports[`Validate cli > app 'with spelling errors Dutch.txt words only' Expect Error: [Function CheckFailed] 1`] = `[]`;
exports[`Validate cli > app 'with spelling errors Dutch.txt words ' Expect Error: [Function CheckFailed] 2`] = `
exports[`Validate cli > app 'with spelling errors Dutch.txt words only' Expect Error: [Function CheckFailed] 2`] = `
"error 0.00ms X
log NEDERLANDS
log wordt
Expand Down Expand Up @@ -1632,7 +1632,7 @@ log ANBI
error CSpell: Files checked: 1, Issues found: 189 in 1 files"
`;
exports[`Validate cli > app 'with spelling errors Dutch.txt words ' Expect Error: [Function CheckFailed] 3`] = `
exports[`Validate cli > app 'with spelling errors Dutch.txt words only' Expect Error: [Function CheckFailed] 3`] = `
"
1/1 ./samples/Dutch.txt"
`;
Expand Down Expand Up @@ -1838,9 +1838,9 @@ exports[`Validate cli > app 'with spelling errors Dutch.txt' Expect Error: [Func
1/1 ./samples/Dutch.txt"
`;
exports[`Validate cli > app success 'suggest' run with [ 'suggest', 'café', …(2) ] 1`] = `[]`;
exports[`Validate cli > app success 'suggest' run with [ Array(4) ] 1`] = `[]`;
exports[`Validate cli > app success 'suggest' run with [ 'suggest', 'café', …(2) ] 2`] = `
exports[`Validate cli > app success 'suggest' run with [ Array(4) ] 2`] = `
"café:
- café"
`;
Expand Down Expand Up @@ -2027,46 +2027,6 @@ exports[`Validate cli > app suggest [ 'sug', '--stdin', '-d=en_us', '-v' ] 2`] =
exports[`Validate cli > app suggest [ 'sug', '--stdin', '-d=en_us', '-v' ] 3`] = `""`;
exports[`Validate cli > app suggest [ 'sug', 'dutch', '-d=en_us', …(3) ] 1`] = `[]`;
exports[`Validate cli > app suggest [ 'sug', 'dutch', '-d=en_us', …(3) ] 2`] = `
"dutch:
- dutch - 0 en-gb, en_us
- Dutch - 1 en_us"
`;
exports[`Validate cli > app suggest [ 'sug', 'dutch', '-d=en_us', …(3) ] 3`] = `""`;
exports[`Validate cli > app suggest [ 'sug', 'dutch', …(3) ] 1`] = `[]`;
exports[`Validate cli > app suggest [ 'sug', 'dutch', …(3) ] 2`] = `
"dutch:
- dutch - 0 en_us
- Dutch - 1 en_us"
`;
exports[`Validate cli > app suggest [ 'sug', 'dutch', …(3) ] 3`] = `""`;
exports[`Validate cli > app suggest [ 'sug', 'dutch', …(3) ] 4`] = `[]`;
exports[`Validate cli > app suggest [ 'sug', 'dutch', …(3) ] 5`] = `
"dutch:
- dutch - 0 en_us
- Dutch - 1 en_us"
`;
exports[`Validate cli > app suggest [ 'sug', 'dutch', …(3) ] 6`] = `""`;
exports[`Validate cli > app suggest [ 'sug', 'dutch', …(4) ] 1`] = `[]`;
exports[`Validate cli > app suggest [ 'sug', 'dutch', …(4) ] 2`] = `
"dutch:
- dutch - 0 en-gb, en_us
- Dutch - 1 en_us"
`;
exports[`Validate cli > app suggest [ 'sug', 'dutch', …(4) ] 3`] = `""`;
exports[`Validate cli > app suggest [ 'sug', 'mexico', '-d=en_us' ] 1`] = `[]`;
exports[`Validate cli > app suggest [ 'sug', 'mexico', '-d=en_us' ] 2`] = `
Expand Down Expand Up @@ -2099,15 +2059,6 @@ exports[`Validate cli > app suggest [ 'sug', 'mexico', '-d=en_us', '-v' ] 2`] =
exports[`Validate cli > app suggest [ 'sug', 'mexico', '-d=en_us', '-v' ] 3`] = `""`;
exports[`Validate cli > app suggest [ 'sug', 'mexico', '-d=en_us', …(2) ] 1`] = `[]`;
exports[`Validate cli > app suggest [ 'sug', 'mexico', '-d=en_us', …(2) ] 2`] = `
"mexico:
<no suggestions>"
`;
exports[`Validate cli > app suggest [ 'sug', 'mexico', '-d=en_us', …(2) ] 3`] = `""`;
exports[`Validate cli > app suggest [ 'sug', 'mexico', '-d=en-gb' ] 1`] = `[]`;
exports[`Validate cli > app suggest [ 'sug', 'mexico', '-d=en-gb' ] 2`] = `
Expand All @@ -2133,3 +2084,52 @@ exports[`Validate cli > app suggest [ 'sug', 'mexico', '-d=en-us' ] 1`] = `[]`;
exports[`Validate cli > app suggest [ 'sug', 'mexico', '-d=en-us' ] 2`] = `""`;
exports[`Validate cli > app suggest [ 'sug', 'mexico', '-d=en-us' ] 3`] = `"Unknown dictionary: \\"en-us\\""`;
exports[`Validate cli > app suggest [ Array(5) ] 1`] = `[]`;
exports[`Validate cli > app suggest [ Array(5) ] 2`] = `
"mexico:
<no suggestions>"
`;
exports[`Validate cli > app suggest [ Array(5) ] 3`] = `""`;
exports[`Validate cli > app suggest [ Array(5) ] 4`] = `[]`;
exports[`Validate cli > app suggest [ Array(5) ] 5`] = `
"dutch:
- dutch - 0 en_us
- Dutch - 1 en_us"
`;
exports[`Validate cli > app suggest [ Array(5) ] 6`] = `""`;
exports[`Validate cli > app suggest [ Array(5) ] 7`] = `[]`;
exports[`Validate cli > app suggest [ Array(5) ] 8`] = `
"dutch:
- dutch - 0 en_us
- Dutch - 1 en_us"
`;
exports[`Validate cli > app suggest [ Array(5) ] 9`] = `""`;
exports[`Validate cli > app suggest [ Array(6) ] 1`] = `[]`;
exports[`Validate cli > app suggest [ Array(6) ] 2`] = `
"dutch:
- dutch - 0 en-gb, en_us
- Dutch - 1 en_us"
`;
exports[`Validate cli > app suggest [ Array(6) ] 3`] = `""`;
exports[`Validate cli > app suggest [ Array(6) ] 4`] = `[]`;
exports[`Validate cli > app suggest [ Array(6) ] 5`] = `
"dutch:
- dutch - 0 en-gb, en_us
- Dutch - 1 en_us"
`;
exports[`Validate cli > app suggest [ Array(6) ] 6`] = `""`;
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`suggestionsEmitter > emitSuggestionResult 'walk' { word: 'walk', cost: +0, …(4) } { word: 'walked', cost: 2, …(4) } { verbose: 1 } 1`] = `
exports[`suggestionsEmitter > emitSuggestionResult 'walk' { Object (word, cost, ...) } { Object (word, cost, ...) } { verbose: 1 } 1`] = `
"walk:
- walk - 0 dict-a
- walked - 2 dict-a"
`;

exports[`suggestionsEmitter > emitSuggestionResult 'walk' { word: 'walk', cost: +0, …(4) } { word: 'walked', cost: 2, …(4) } { verbose: 1 } 2`] = `
exports[`suggestionsEmitter > emitSuggestionResult 'walk' { Object (word, cost, ...) } { Object (word, cost, ...) } { verbose: 1 } 2`] = `
"walk:
- walk - 0 dict-a
- walked N - 2 dict-a"
`;

exports[`suggestionsEmitter > emitSuggestionResult 'walk' { word: 'walk', cost: +0, …(4) } { word: 'walked', cost: 2, …(4) } { verbose: 1 } 3`] = `
exports[`suggestionsEmitter > emitSuggestionResult 'walk' { Object (word, cost, ...) } { Object (word, cost, ...) } { verbose: 1 } 3`] = `
"walk:
- walk - 0 dict-a
- walked X - 2 dict-a"
`;

exports[`suggestionsEmitter > emitSuggestionResult 'walk' { word: 'walk', cost: +0, …(4) } { word: 'walked', cost: 2, …(4) } { verbose: 1 } 4`] = `
exports[`suggestionsEmitter > emitSuggestionResult 'walk' { Object (word, cost, ...) } { Object (word, cost, ...) } { verbose: 1 } 4`] = `
"walk:
- walk - 0 dict-a
- walked XN - 2 dict-a"
`;

exports[`suggestionsEmitter > emitSuggestionResult 'walk' { word: 'walk', cost: +0, …(4) } { word: 'walked', cost: 2, …(4) } {} 1`] = `
exports[`suggestionsEmitter > emitSuggestionResult 'walk' { Object (word, cost, ...) } { Object (word, cost, ...) } {} 1`] = `
"walk:
- walk
- walked"
Expand Down
Loading

0 comments on commit ae24cf8

Please sign in to comment.