Skip to content

Commit 9eb485c

Browse files
chore(deps): update vitest (#1537)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Shinigami92 <chrissi92@hotmail.de>
1 parent e60eb42 commit 9eb485c

File tree

17 files changed

+174
-216
lines changed

17 files changed

+174
-216
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@
9696
"@types/node": "20.19.25",
9797
"@types/pg": "8.15.6",
9898
"@types/yargs": "17.0.35",
99-
"@vitest/coverage-v8": "4.0.6",
100-
"@vitest/eslint-plugin": "1.4.0",
101-
"@vitest/ui": "4.0.6",
99+
"@vitest/coverage-v8": "4.0.15",
100+
"@vitest/eslint-plugin": "1.5.2",
101+
"@vitest/ui": "4.0.15",
102102
"config": "4.1.1",
103103
"dotenv": "17.2.3",
104104
"dotenv-expand": "12.0.3",
@@ -119,7 +119,7 @@
119119
"typescript": "5.9.3",
120120
"typescript-eslint": "8.48.1",
121121
"vitepress": "1.6.4",
122-
"vitest": "4.0.6"
122+
"vitest": "4.0.15"
123123
},
124124
"peerDependencies": {
125125
"@types/pg": ">=6.0.0 <9.0.0",

pnpm-lock.yaml

Lines changed: 142 additions & 188 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/db.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ describe('db', () => {
118118
fn(new Error(error))
119119
);
120120

121-
await expect(() => db.query('query')).rejects.toThrow(error);
121+
await expect(() => db.query('query')).rejects.toThrowError(error);
122122
expect(hoisted.client.query).not.toHaveBeenCalled();
123123
});
124124

@@ -136,7 +136,7 @@ describe('db', () => {
136136

137137
vi.spyOn(hoisted.client, 'query').mockRejectedValue(new Error(error));
138138

139-
await expect(() => db.query('query')).rejects.toThrow(error);
139+
await expect(() => db.query('query')).rejects.toThrowError(error);
140140
expect(hoisted.client.connect).toHaveBeenCalledOnce();
141141
});
142142
});

test/migration.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ describe('migration', () => {
4949

5050
it('should fail with a non-numeric value', () => {
5151
const prefix = 'invalid-prefix';
52-
expect(() => getNumericPrefix(prefix, logger)).toThrow(
52+
expect(() => getNumericPrefix(prefix, logger)).toThrowError(
5353
new Error(`Cannot determine numeric prefix for "${prefix}"`)
5454
);
5555
});
@@ -176,7 +176,7 @@ describe('migration', () => {
176176
'test/invalid-migrations/invalid-prefix.*'
177177
);
178178

179-
await expect(prefix).rejects.toThrow();
179+
await expect(prefix).rejects.toThrowError();
180180
});
181181

182182
it('should get an epoch timestamp as a prefix', async () => {
@@ -305,7 +305,7 @@ describe('migration', () => {
305305

306306
expect(() => {
307307
migration.apply(direction);
308-
}).toThrow(
308+
}).toThrowError(
309309
new Error(
310310
`Unknown value for direction: ${direction}. Is the migration ${invalidMigrationName} exporting a '${direction}' function?`
311311
)

test/operations/constraints/addConstraint.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ describe('operations', () => {
1212
});
1313

1414
it('should throw error when no constraint options are provided', () => {
15-
expect(() => addConstraintFn('distributors', 'zipchk', {})).toThrow(
15+
expect(() =>
16+
addConstraintFn('distributors', 'zipchk', {})
17+
).toThrowError(
1618
new Error('No constraint options provided for addConstraint')
1719
);
1820
});
@@ -151,7 +153,7 @@ COMMENT ON CONSTRAINT "my_constraint_name" ON "my_table_name" IS $pga$this is an
151153
it('should throw error when constraintName is null', () => {
152154
expect(() =>
153155
addConstraintFn.reverse('distributors', null, {})
154-
).toThrow(
156+
).toThrowError(
155157
new Error(
156158
'Impossible to automatically infer down migration for addConstraint without naming constraint'
157159
)
@@ -165,7 +167,7 @@ COMMENT ON CONSTRAINT "my_constraint_name" ON "my_table_name" IS $pga$this is an
165167
'zipchk',
166168
'CHECK (char_length(zipcode) = 5)'
167169
)
168-
).toThrow(
170+
).toThrowError(
169171
new Error(
170172
'Impossible to automatically infer down migration for addConstraint with raw SQL expression'
171173
)

test/operations/domains/createDomain.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe('operations', () => {
7979
check: "VALUE ~ '^d{5}$'",
8080
notNull: true,
8181
})
82-
).toThrow(
82+
).toThrowError(
8383
new Error('"notNull" and "check" can\'t be specified together')
8484
);
8585
});

test/operations/functions/createFunction.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ $pga$
144144
},
145145
'SELECT $1 + $2;'
146146
)
147-
).toThrow(
147+
).toThrowError(
148148
new Error('Language for function "add" have to be specified')
149149
);
150150
});

test/operations/indexes/createIndex.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ describe('operations', () => {
183183
it('should throw an error if nulls option is used without unique index', () => {
184184
expect(() =>
185185
createIndexFn('films', ['title'], { nulls: 'distinct' })
186-
).toThrow('The "nulls" option can only be used with unique indexes.');
186+
).toThrowError(
187+
'The "nulls" option can only be used with unique indexes.'
188+
);
187189
});
188190

189191
describe('reverse', () => {

test/operations/policies/alterPolicy.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('operations', () => {
1212
});
1313

1414
it('should throw error when no policy options are provided', () => {
15-
expect(() => alterPolicyFn('my_table', 'p1', {})).toThrow(
15+
expect(() => alterPolicyFn('my_table', 'p1', {})).toThrowError(
1616
new Error('No policy options provided for alterPolicy')
1717
);
1818
});

test/operations/sequences/alterSequence.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('operations', () => {
1212
});
1313

1414
it('should throw error when no sequence options are provided', () => {
15-
expect(() => alterSequenceFn('serial', {})).toThrow(
15+
expect(() => alterSequenceFn('serial', {})).toThrowError(
1616
new Error('No sequence options provided for alterSequence')
1717
);
1818
});

0 commit comments

Comments
 (0)