Skip to content

Commit

Permalink
passing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Mar 31, 2022
1 parent 16f1d34 commit 6d92777
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 19 deletions.
3 changes: 1 addition & 2 deletions packages/SwingSet/test/message-patterns.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint no-lone-blocks: "off" */
/* eslint dot-notation: "off" */
/* eslint-disable no-lone-blocks, dot-notation */
// I turned off dot-notation so eslint won't rewrite the grep-preserving
// test.stuff patterns.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-lone-blocks */
// eslint-disable-next-line import/order
import { test } from '../../../tools/prepare-test-env-ava.js';
// eslint-disable-next-line import/order
Expand Down
1 change: 1 addition & 0 deletions packages/SwingSet/test/vat-admin/test-replay.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-lone-blocks */
// eslint-disable-next-line import/order
import { test } from '../../tools/prepare-test-env-ava.js';
// eslint-disable-next-line import/order
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint-config/eslint-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"plugin:ava/recommended"
],
"rules": {
"ava/use-test": "off", // until https://github.com/avajs/eslint-plugin-ava/pull/294#issuecomment-1084648317
"jsdoc/no-multi-asterisks": "off",
"jsdoc/multiline-blocks": "off",
// Use these rules to warn about JSDoc type problems, such as after
Expand Down Expand Up @@ -40,4 +41,4 @@
"test262/**",
"ava*.config.js"
]
}
}
1 change: 1 addition & 0 deletions packages/run-protocol/test/attestation/test-userFlow.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { setupZCFTest } from '@agoric/zoe/test/unitTests/zcf/setupZcfTest.js';

import { makeCopyBag } from '@agoric/store';
import { makeAttestationFacets } from '../../src/runStake/attestation.js';
// eslint-disable-next-line ava/no-import-test-files
import { makeMockLienBridge } from './test-attestation.js';

const makeDoReturnAttestation =
Expand Down
1 change: 1 addition & 0 deletions packages/solo/src/start.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @ts-check
/* eslint-disable no-lone-blocks */
/* global process setTimeout */
import fs from 'fs';
import path from 'path';
Expand Down
2 changes: 2 additions & 0 deletions packages/store/test/test-encodePassable.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import {
makeDecodePassable,
} from '../src/patterns/encodePassable.js';
import { compareRank, makeComparatorKit } from '../src/patterns/rankOrder.js';
// eslint-disable-next-line ava/no-import-test-files
import { assertionPassed } from './test-store.js';
// eslint-disable-next-line ava/no-import-test-files
import { sample } from './test-rankOrder.js';

const { details: X } = assert;
Expand Down
1 change: 1 addition & 0 deletions packages/store/test/test-rankOrder.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
getPassStyleCover,
assertRankSorted,
} from '../src/patterns/rankOrder.js';
// eslint-disable-next-line ava/no-import-test-files
import { assertionPassed } from './test-store.js';

const { quote: q } = assert;
Expand Down
4 changes: 2 additions & 2 deletions packages/swing-store/test/test-snapstore.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ test('build temp file; compress to cache file', async t => {
keepTmp = fn;
});
t.is(
'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad',
hash,
'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad',
);
t.falsy(
fs.existsSync(keepTmp),
Expand Down Expand Up @@ -69,7 +69,7 @@ test('snapStore prepare / commit delete is robust', async t => {

store.prepareToDelete(hashes[2]);
store.commitDeletes();
t.deepEqual(fs.readdirSync(pool.name).length, 4);
t.is(fs.readdirSync(pool.name).length, 4);

// Restore (re-save) between prepare and commit.
store.prepareToDelete(hashes[3]);
Expand Down
4 changes: 2 additions & 2 deletions packages/ui-components/test/components/test-NatAmountInput.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check

/* eslint-disable ava/no-ignored-test-files -- this JSX is compiled to the actual test file */
import '@endo/init';
import React from 'react';
import { TextField } from '@material-ui/core';
Expand Down Expand Up @@ -117,7 +117,7 @@ test('error=true', t => {
t.is(input.attr('aria-invalid'), 'true');
});

test('can simulate input - just calls onChange', async t => {
test('can simulate input - just calls onChange', t => {
let receivedValue;
const onChange = newValue => {
receivedValue = newValue;
Expand Down
2 changes: 1 addition & 1 deletion packages/vats/test/test-dump.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import test from 'ava';
import { dump } from '../src/repl.js';

// Taken from https://github.com/endojs/endo/tree/main/packages/ses/test/error/test-assert-log.js#L414
test('dump: the @erights challenge', async t => {
test('dump: the @erights challenge', t => {
const superTagged = { [Symbol.toStringTag]: 'Tagged' };
const subTagged = { __proto__: superTagged };
const subTaggedNonEmpty = { __proto__: superTagged, foo: 'x' };
Expand Down
20 changes: 10 additions & 10 deletions packages/vats/test/test-repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test('repl: basic eval, eventual promise resolution', async t => {
const { doEval, sentMessages, getHighestHistory } = make();

let m = sentMessages.shift();
t.deepEqual(m.type, 'updateHistory');
t.is(m.type, 'updateHistory');
t.is(sentMessages.length, 0);

t.deepEqual(getHighestHistory(), { highestHistory: -1 });
Expand Down Expand Up @@ -62,13 +62,13 @@ test('repl: basic eval, eventual promise resolution', async t => {
t.deepEqual(sentMessages, []);
});

test('repl: bigInts', async t => {
test('repl: bigInts', t => {
const { doEval, sentMessages } = make();

let m = sentMessages.shift();
t.deepEqual(doEval(0, '3n'), {});
m = sentMessages.shift();
t.deepEqual(m.type, 'updateHistory');
t.is(m.type, 'updateHistory');
t.is(sentMessages.length, 1);

t.is(m.histnum, 0);
Expand All @@ -80,7 +80,7 @@ test('repl: bigInts', async t => {
t.deepEqual(sentMessages, []);
});

test('repl: Symbols', async t => {
test('repl: Symbols', t => {
const { doEval, sentMessages } = make();

let m = sentMessages.shift();
Expand All @@ -96,7 +96,7 @@ test('repl: Symbols', async t => {
for (const [expr, display] of exprDisplays) {
t.deepEqual(doEval(histnum, expr), {});
m = sentMessages.shift();
t.deepEqual(m.type, 'updateHistory');
t.is(m.type, 'updateHistory');
t.is(sentMessages.length, 1);

t.is(m.histnum, histnum);
Expand All @@ -110,7 +110,7 @@ test('repl: Symbols', async t => {
}
});

test('repl: unjsonables', async t => {
test('repl: unjsonables', t => {
const { doEval, sentMessages } = make();

let m = sentMessages.shift();
Expand All @@ -119,7 +119,7 @@ test('repl: unjsonables', async t => {
for (const valStr of ['NaN', 'Infinity', '-Infinity', 'undefined']) {
t.deepEqual(doEval(histnum, valStr), {});
m = sentMessages.shift();
t.deepEqual(m.type, 'updateHistory');
t.is(m.type, 'updateHistory');
t.is(sentMessages.length, 1);

t.is(m.histnum, histnum);
Expand All @@ -133,11 +133,11 @@ test('repl: unjsonables', async t => {
}
});

test('repl: sloppyGlobals, home, endowments', async t => {
test('repl: sloppyGlobals, home, endowments', t => {
const { doEval, sentMessages } = make();

let m = sentMessages.shift();
t.deepEqual(m.type, 'updateHistory');
t.is(m.type, 'updateHistory');
t.is(sentMessages.length, 0);

t.deepEqual(
Expand Down Expand Up @@ -170,7 +170,7 @@ test('repl: eventual send', async t => {
const { doEval, sentMessages } = make();

let m = sentMessages.shift();
t.deepEqual(m.type, 'updateHistory');
t.is(m.type, 'updateHistory');
t.is(sentMessages.length, 0);

t.deepEqual(doEval(0, 'target = harden({ foo(x) { return x+1; } })'), {});
Expand Down
2 changes: 1 addition & 1 deletion packages/zoe/test/swingsetTests/zoe/test-zoe.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ const expectedBadTimerLog = [
];

// TODO: Unskip. See https://github.com/Agoric/agoric-sdk/issues/1625
test.skip('zoe - bad timer', async t => {
test.failing('zoe - bad timer', async t => {
const startingValues = [
[3, 0, 0],
[0, 0, 0],
Expand Down

0 comments on commit 6d92777

Please sign in to comment.