Skip to content

Commit 8f25cd9

Browse files
Update dependency ava to v6 (#309)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Eric Lau <[email protected]>
1 parent 93a11c4 commit 8f25cd9

File tree

6 files changed

+401
-224
lines changed

6 files changed

+401
-224
lines changed

packages/core-cairo/ava.config.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
module.exports = {
22
extensions: ['ts'],
33
require: ['ts-node/register'],
4-
ignoredByWatcher: [
5-
'contracts',
6-
'artifacts',
7-
'cache',
8-
],
4+
watchmode: {
5+
ignoreChanges: [
6+
'contracts',
7+
'artifacts',
8+
'cache',
9+
],
10+
},
911
timeout: '10m',
1012
workerThreads: false,
1113
};

packages/core-cairo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@types/node": "^18.0.0",
2424
"@types/semver": "^7.5.7",
2525
"array.prototype.flat": "^1.2.4",
26-
"ava": "^5.0.0",
26+
"ava": "^6.0.0",
2727
"rimraf": "^5.0.0",
2828
"ts-node": "^10.4.0",
2929
"typescript": "^4.9.0",

packages/core-cairo/src/utils/convert-strings.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import test from 'ava';
22

33
import { toIdentifier, toShortString } from './convert-strings';
4-
import type { OptionsError } from '../error';
4+
import { OptionsError } from '../error';
55

66
test('identifier - unmodified', t => {
77
t.is(toIdentifier('abc'), 'abc');
@@ -33,13 +33,13 @@ test('identifier - remove starting numbers', t => {
3333
});
3434

3535
test('identifier - empty string', t => {
36-
let error: OptionsError | undefined = t.throws(() => toIdentifier(''));
37-
t.is(error?.messages.name, 'Identifier is empty or does not have valid characters');
36+
let error = t.throws(() => toIdentifier(''), { instanceOf: OptionsError });
37+
t.is(error.messages.name, 'Identifier is empty or does not have valid characters');
3838
});
3939

4040
test('identifier - no valid chars', t => {
41-
let error: OptionsError | undefined = t.throws(() => toIdentifier('123'));
42-
t.is(error?.messages.name, 'Identifier is empty or does not have valid characters');
41+
let error = t.throws(() => toIdentifier('123'), { instanceOf: OptionsError });
42+
t.is(error.messages.name, 'Identifier is empty or does not have valid characters');
4343
});
4444

4545
test('short string - unmodified', t => {
@@ -65,6 +65,6 @@ test('short string - escape backslash', t => {
6565
test('short string - max 31 characters', t => {
6666
t.is(toShortString('A234567890123456789012345678901', 'foo'), 'A234567890123456789012345678901');
6767

68-
let error: OptionsError | undefined = t.throws(() => toShortString('A2345678901234567890123456789012', 'foo'));
69-
t.is(error?.messages.foo, 'String is longer than 31 characters');
68+
let error = t.throws(() => toShortString('A2345678901234567890123456789012', 'foo'), { instanceOf: OptionsError });
69+
t.is(error.messages.foo, 'String is longer than 31 characters');
7070
});

packages/core/ava.config.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
module.exports = {
22
extensions: ['ts'],
33
require: ['ts-node/register'],
4-
ignoredByWatcher: [
5-
'contracts',
6-
'artifacts',
7-
'cache',
8-
],
4+
watchmode: {
5+
ignoreChanges: [
6+
'contracts',
7+
'artifacts',
8+
'cache',
9+
],
10+
},
911
timeout: '10m',
1012
workerThreads: false,
1113
};

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@types/node": "^18.0.0",
2626
"@types/semver": "^7.5.7",
2727
"array.prototype.flat": "^1.2.4",
28-
"ava": "^5.0.0",
28+
"ava": "^6.0.0",
2929
"hardhat": "^2.1.1",
3030
"jszip": "^3.6.0",
3131
"rimraf": "^5.0.0",

0 commit comments

Comments
 (0)