Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency ava to v6 #309

Merged
merged 4 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 4 additions & 4 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,12 +33,12 @@ test('identifier - remove starting numbers', t => {
});

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

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'));
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