Skip to content

Commit

Permalink
Update dependency ava to v6 (#309)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Eric Lau <[email protected]>
  • Loading branch information
renovate[bot] and ericglau authored Mar 1, 2024
1 parent 93a11c4 commit 8f25cd9
Show file tree
Hide file tree
Showing 6 changed files with 401 additions and 224 deletions.
12 changes: 7 additions & 5 deletions packages/core-cairo/ava.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
module.exports = {
extensions: ['ts'],
require: ['ts-node/register'],
ignoredByWatcher: [
'contracts',
'artifacts',
'cache',
],
watchmode: {
ignoreChanges: [
'contracts',
'artifacts',
'cache',
],
},
timeout: '10m',
workerThreads: false,
};
2 changes: 1 addition & 1 deletion packages/core-cairo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@types/node": "^18.0.0",
"@types/semver": "^7.5.7",
"array.prototype.flat": "^1.2.4",
"ava": "^5.0.0",
"ava": "^6.0.0",
"rimraf": "^5.0.0",
"ts-node": "^10.4.0",
"typescript": "^4.9.0",
Expand Down
14 changes: 7 additions & 7 deletions packages/core-cairo/src/utils/convert-strings.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import test from 'ava';

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

test('identifier - unmodified', t => {
t.is(toIdentifier('abc'), 'abc');
Expand Down Expand Up @@ -33,13 +33,13 @@ test('identifier - remove starting numbers', t => {
});

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

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

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

let error: OptionsError | undefined = t.throws(() => toShortString('A2345678901234567890123456789012', 'foo'));
t.is(error?.messages.foo, 'String is longer than 31 characters');
let error = t.throws(() => toShortString('A2345678901234567890123456789012', 'foo'), { instanceOf: OptionsError });
t.is(error.messages.foo, 'String is longer than 31 characters');
});
12 changes: 7 additions & 5 deletions packages/core/ava.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
module.exports = {
extensions: ['ts'],
require: ['ts-node/register'],
ignoredByWatcher: [
'contracts',
'artifacts',
'cache',
],
watchmode: {
ignoreChanges: [
'contracts',
'artifacts',
'cache',
],
},
timeout: '10m',
workerThreads: false,
};
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@types/node": "^18.0.0",
"@types/semver": "^7.5.7",
"array.prototype.flat": "^1.2.4",
"ava": "^5.0.0",
"ava": "^6.0.0",
"hardhat": "^2.1.1",
"jszip": "^3.6.0",
"rimraf": "^5.0.0",
Expand Down
Loading

0 comments on commit 8f25cd9

Please sign in to comment.