Skip to content

Commit

Permalink
WIP: setup as-test
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjah committed Jul 10, 2024
1 parent f1f85e4 commit cac64f6
Show file tree
Hide file tree
Showing 10 changed files with 5,975 additions and 6,855 deletions.
2 changes: 1 addition & 1 deletion packages/sc-deployer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@massalabs/massa-sc-compiler": "^0.1.0",
"@massalabs/massa-web3": "^3.0.2",
"@types/node": "^18.11.10",
"assemblyscript": "^0.27.19",
"assemblyscript": "^0.27.29",
"rimraf": "^5.0.1",
"typescript": "^5.1.6"
},
Expand Down

This file was deleted.

28 changes: 0 additions & 28 deletions packages/sc-project-initializer/commands/init/as-pect.config.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"options": {
"bindings": "raw"
}
}
23 changes: 23 additions & 0 deletions packages/sc-project-initializer/commands/init/as-test.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"input": [
"./assembly/__tests__/*.spec.ts"
],
"outDir": "./build",
"config": "./as-test.asconfig.json",
"suites": [],
"coverage": {
"enabled": false,
"show": false
},
"buildOptions": {
"wasi": false,
"parallel": true,
"verbose": true
},
"runOptions": {
"runtime": {
"name": "node",
"run": "node ./test.js"
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import { describe, expect, log, run, test } from 'as-test';
import { stringToBytes } from '@massalabs/as-types';
import { event } from '../contracts/main';

describe('Group test', () => {
test('Testing event', () => {
expect(event([])).toStrictEqual(stringToBytes("I'm an event!"));
expect(event([])).toBe(stringToBytes("I'm an event!"));
log('Log test 😉 😉 😉');
});
});

run({
log: true,
});
Loading

0 comments on commit cac64f6

Please sign in to comment.