Skip to content

Commit bf60a80

Browse files
authored
chore: update fast-check (#15581)
1 parent f11c8bb commit bf60a80

File tree

4 files changed

+29
-23
lines changed

4 files changed

+29
-23
lines changed

packages/diff-sequences/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@
3030
"./package.json": "./package.json"
3131
},
3232
"devDependencies": {
33-
"@fast-check/jest": "^2.1.1",
33+
"@fast-check/jest": "^2.0.0",
3434
"benchmark": "^2.1.4",
35-
"diff": "^7.0.0",
36-
"fast-check": "^3.23.2"
35+
"diff": "^7.0.0"
3736
},
3837
"publishConfig": {
3938
"access": "public"

packages/diff-sequences/src/__tests__/index.property.test.ts

+10-7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
import {fc, it} from '@fast-check/jest';
1010
import diff from '../';
1111

12+
const char = () =>
13+
fc.string({maxLength: 1, minLength: 1, unit: 'grapheme-ascii'});
14+
1215
const findCommonItems = (a: Array<string>, b: Array<string>): Array<string> => {
1316
const array: Array<string> = [];
1417
diff(
@@ -55,11 +58,11 @@ const isSubsequenceOf = (
5558
return iSub === subsequence.length;
5659
};
5760

58-
it.prop([fc.array(fc.char())])('should be reflexive', a => {
61+
it.prop([fc.array(char())])('should be reflexive', a => {
5962
expect(findCommonItems(a, a)).toEqual(a);
6063
});
6164

62-
it.prop([fc.array(fc.char()), fc.array(fc.char())])(
65+
it.prop([fc.array(char()), fc.array(char())])(
6366
'should find the same number of common items when switching the inputs',
6467
// findCommonItems is not symmetric as:
6568
// > findCommonItems(["Z"," "], [" ","Z"]) = [" "]
@@ -71,7 +74,7 @@ it.prop([fc.array(fc.char()), fc.array(fc.char())])(
7174
},
7275
);
7376

74-
it.prop([fc.array(fc.char()), fc.array(fc.char())])(
77+
it.prop([fc.array(char()), fc.array(char())])(
7578
'should have at most the length of its inputs',
7679
(a, b) => {
7780
const commonItems = findCommonItems(a, b);
@@ -80,7 +83,7 @@ it.prop([fc.array(fc.char()), fc.array(fc.char())])(
8083
},
8184
);
8285

83-
it.prop([fc.array(fc.char()), fc.array(fc.char())])(
86+
it.prop([fc.array(char()), fc.array(char())])(
8487
'should have at most the same number of each character as its inputs',
8588
(a, b) => {
8689
const commonItems = findCommonItems(a, b);
@@ -93,7 +96,7 @@ it.prop([fc.array(fc.char()), fc.array(fc.char())])(
9396
},
9497
);
9598

96-
it.prop([fc.array(fc.char()), fc.array(fc.char())])(
99+
it.prop([fc.array(char()), fc.array(char())])(
97100
'should be a subsequence of its inputs',
98101
(a, b) => {
99102
const commonItems = findCommonItems(a, b);
@@ -102,7 +105,7 @@ it.prop([fc.array(fc.char()), fc.array(fc.char())])(
102105
},
103106
);
104107

105-
it.prop([fc.array(fc.char()), fc.array(fc.char())])(
108+
it.prop([fc.array(char()), fc.array(char())])(
106109
'should be no-op when passing common items',
107110
(a, b) => {
108111
const commonItems = findCommonItems(a, b);
@@ -111,7 +114,7 @@ it.prop([fc.array(fc.char()), fc.array(fc.char())])(
111114
},
112115
);
113116

114-
it.prop([fc.array(fc.array(fc.char()))])(
117+
it.prop([fc.array(fc.array(char()))])(
115118
'should find the exact common items when one array is subarray of the other',
116119
data => {
117120
const allData = flatten(data); // [...data[0], ...data[1], ...data[2], ...data[3], ...]

packages/expect/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@
2929
"jest-util": "workspace:*"
3030
},
3131
"devDependencies": {
32-
"@fast-check/jest": "^2.1.1",
32+
"@fast-check/jest": "^2.0.0",
3333
"@jest/test-utils": "workspace:*",
3434
"chalk": "^4.0.0",
35-
"fast-check": "^3.23.2",
3635
"immutable": "^5.0.0"
3736
},
3837
"engines": {

yarn.lock

+16-11
Original file line numberDiff line numberDiff line change
@@ -3437,7 +3437,7 @@ __metadata:
34373437
languageName: node
34383438
linkType: hard
34393439

3440-
"@fast-check/jest@npm:^2.1.1":
3440+
"@fast-check/jest@npm:^2.0.0":
34413441
version: 2.1.1
34423442
resolution: "@fast-check/jest@npm:2.1.1"
34433443
dependencies:
@@ -9651,10 +9651,9 @@ __metadata:
96519651
version: 0.0.0-use.local
96529652
resolution: "diff-sequences@workspace:packages/diff-sequences"
96539653
dependencies:
9654-
"@fast-check/jest": ^2.1.1
9654+
"@fast-check/jest": ^2.0.0
96559655
benchmark: ^2.1.4
96569656
diff: ^7.0.0
9657-
fast-check: ^3.23.2
96589657
languageName: unknown
96599658
linkType: soft
96609659

@@ -11033,11 +11032,10 @@ __metadata:
1103311032
version: 0.0.0-use.local
1103411033
resolution: "expect@workspace:packages/expect"
1103511034
dependencies:
11036-
"@fast-check/jest": ^2.1.1
11035+
"@fast-check/jest": ^2.0.0
1103711036
"@jest/expect-utils": "workspace:*"
1103811037
"@jest/test-utils": "workspace:*"
1103911038
chalk: ^4.0.0
11040-
fast-check: ^3.23.2
1104111039
immutable: ^5.0.0
1104211040
jest-get-type: "workspace:*"
1104311041
jest-matcher-utils: "workspace:*"
@@ -11109,12 +11107,12 @@ __metadata:
1110911107
languageName: node
1111011108
linkType: hard
1111111109

11112-
"fast-check@npm:^3.0.0 || ^4.0.0, fast-check@npm:^3.23.2":
11113-
version: 3.23.2
11114-
resolution: "fast-check@npm:3.23.2"
11110+
"fast-check@npm:^3.0.0 || ^4.0.0":
11111+
version: 4.1.1
11112+
resolution: "fast-check@npm:4.1.1"
1111511113
dependencies:
11116-
pure-rand: ^6.1.0
11117-
checksum: b815bd1a2bda33b8e1927a732368f94c3919d5c3b626065479e2389739dfbc6de885fdf48b7a576505edff4f8931798dc737c7bc7039a58b3412746f0d2e9b86
11114+
pure-rand: ^7.0.0
11115+
checksum: 775f1c1d64cfc49aa84dbf9e6f84faefc8c333103bab1e80e14e58d055c2f50f3e29126a5ff1a2740be4d573de9dd184416596da7f9d7fb536cdc60511dc68a1
1111811116
languageName: node
1111911117
linkType: hard
1112011118

@@ -18857,13 +18855,20 @@ __metadata:
1885718855
languageName: node
1885818856
linkType: hard
1885918857

18860-
"pure-rand@npm:^6.0.0, pure-rand@npm:^6.1.0":
18858+
"pure-rand@npm:^6.0.0":
1886118859
version: 6.1.0
1886218860
resolution: "pure-rand@npm:6.1.0"
1886318861
checksum: 8d53bc02bed99eca0b65b505090152ee7e9bd67dd74f8ff32ba1c883b87234067c5bf68d2614759fb217d82594d7a92919e6df80f97885e7b12b42af4bd3316a
1886418862
languageName: node
1886518863
linkType: hard
1886618864

18865+
"pure-rand@npm:^7.0.0":
18866+
version: 7.0.1
18867+
resolution: "pure-rand@npm:7.0.1"
18868+
checksum: 4f543b97a487857a791b8e4c139aad54937397dc8177f1353f7da88556bfa40f5c32bfce3856843b1c3fc3a00b8472cceb22957c10b21c14e59e36a02ec9353b
18869+
languageName: node
18870+
linkType: hard
18871+
1886718872
"qs@npm:6.13.0":
1886818873
version: 6.13.0
1886918874
resolution: "qs@npm:6.13.0"

0 commit comments

Comments
 (0)