Skip to content

Commit

Permalink
deps(mocha) - fix integration tests by changing filename and ensuring…
Browse files Browse the repository at this point in the history
… json files are read correctly
  • Loading branch information
ctrlc03 committed Nov 9, 2023
1 parent 1329572 commit e14bebe
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion circuits/ts/__tests__/ProcessMessages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const messageBatchSize = 5
const coordinatorKeypair = new Keypair()

describe('ProcessMessage circuit', function() {
this.timeout(90000)
this.timeout(900000)

let circuit: any
let hasherCircuit: any
Expand Down
3 changes: 2 additions & 1 deletion integrationTests/ts/__tests__/cli-genMaciKeypair.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import {
} from "chai"
import { exec } from './utils'

describe('genMaciKeypair CLI subcommand', () => {
describe('genMaciKeypair CLI subcommand', function() {
this.timeout(100000)
const command = 'node ../cli/build/index.js genMaciKeypair'

it('genMaciKeypair should output a random private key and public key', async () => {
Expand Down
3 changes: 2 additions & 1 deletion integrationTests/ts/__tests__/cli-genMaciPubkey.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import {
} from "chai"
import { exec } from './utils'

describe('genMaciPubkey CLI subcommand', () => {
describe('genMaciPubkey CLI subcommand', function() {
this.timeout(100000)
const command = 'node ../cli/build/index.js genMaciKeypair'

it('genMaciPubkey should output a correct public key', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
loadData,
execute,
executeSuite,
} from './suites'
} from './suitesUtils'
import {
expect
} from "chai"
Expand Down
4 changes: 2 additions & 2 deletions integrationTests/ts/__tests__/suites.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {
import {
loadData,
executeSuite,
} from './suites'
} from './suitesUtils'

describe('Test suites', function() {
this.timeout(5000000)
this.timeout(500000000)
const data = loadData('suites.json')
for (const test of data.suites) {
it(test.description, async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const execute = (command: any) => {
}

const loadData = (name: string) => {
return require('@maci-integrationTests/ts/__tests__/' + name)
return JSON.parse(fs.readFileSync(path.join(__dirname, name)).toString())
}

const executeSuite = async (data: any, expect: any) => {
Expand Down

0 comments on commit e14bebe

Please sign in to comment.