Remove async-test.js

Its 'instanceof Promise' check was broken because of a babel Promise

polyfill; but mocha supports async style tests natively now anyway.
This commit is contained in:
Ben Kalman
2016-04-01 18:01:34 -07:00
parent 65c923a4f8
commit f27f9b36bb
8 changed files with 7 additions and 32 deletions
-18
View File
@@ -1,18 +0,0 @@
// @flow
import {test as mtest} from 'mocha';
export default function test(n: string, f: () => ?Promise) {
mtest(n, (done) => {
try {
const p = f();
if (p instanceof Promise) {
p.then(done, done);
} else {
done();
}
} catch (ex) {
done(ex);
}
});
}
+1 -2
View File
@@ -1,10 +1,9 @@
// @flow
import {assert} from 'chai';
import {suite} from 'mocha';
import {suite, test} from 'mocha';
import Random from './pseudo-random.js';
import MemoryStore from './memory-store.js';
import test from './async-test.js';
import {newBlob, BlobWriter} from './blob.js';
import DataStore from './data-store.js';
import {blobType} from './type.js';
+1 -2
View File
@@ -6,7 +6,6 @@ import MemoryStore from './memory-store.js';
import Ref from './ref.js';
import RefValue from './ref-value.js';
import {default as Struct, StructMirror} from './struct.js';
import test from './async-test.js';
import type {float64, int32, int64, uint8, uint16, uint32, uint64} from './primitives.js';
import type {TypeDesc} from './type.js';
import type {Value} from './value.js';
@@ -30,7 +29,7 @@ import {MapLeafSequence, NomsMap} from './map.js';
import {NomsBlob, newBlob} from './blob.js';
import {NomsSet, SetLeafSequence} from './set.js';
import {registerPackage, Package} from './package.js';
import {suite} from 'mocha';
import {suite, test} from 'mocha';
suite('Decode', () => {
function stringToUint8Array(s): Uint8Array {
+1 -2
View File
@@ -1,13 +1,12 @@
// @flow
import {assert} from 'chai';
import {suite} from 'mocha';
import {suite, test} from 'mocha';
import MemoryStore from './memory-store.js';
import Ref from './ref.js';
import RefValue from './ref-value.js';
import Struct from './struct.js';
import test from './async-test.js';
import type {NomsKind} from './noms-kind.js';
import {encodeNomsValue, JsonArrayWriter} from './encode.js';
import {Field, makeCompoundType, makeEnumType, makePrimitiveType, makeStructType, makeType, Type,}
+1 -2
View File
@@ -1,13 +1,12 @@
// @flow
import {assert} from 'chai';
import {suite} from 'mocha';
import {suite, test} from 'mocha';
import DataStore from './data-store.js';
import MemoryStore from './memory-store.js';
import RefValue from './ref-value.js';
import Struct from './struct.js';
import test from './async-test.js';
import {calcSplices} from './edit-distance.js';
import {Field, makeCompoundType, makePrimitiveType, makeStructType, makeType} from './type.js';
import {flatten, flattenParallel} from './test-util.js';
+1 -2
View File
@@ -1,13 +1,12 @@
// @flow
import {assert} from 'chai';
import {suite} from 'mocha';
import {suite, test} from 'mocha';
import DataStore from './data-store';
import MemoryStore from './memory-store.js';
import RefValue from './ref-value.js';
import Struct from './struct.js';
import test from './async-test.js';
import {Field, makeCompoundType, makePrimitiveType, makeStructType, makeType} from './type.js';
import {flatten, flattenParallel} from './test-util.js';
import {invariant} from './assert.js';
+1 -2
View File
@@ -1,11 +1,10 @@
// @flow
import {assert} from 'chai';
import {suite} from 'mocha';
import {suite, test} from 'mocha';
import Chunk from './chunk.js';
import MemoryStore from './memory-store.js';
import Ref from './ref.js';
import test from './async-test.js';
suite('MemoryStore', () => {
async function assertInputInStore(input: string, ref: Ref, ms: MemoryStore) {
+1 -2
View File
@@ -1,13 +1,12 @@
// @flow
import {assert} from 'chai';
import {suite} from 'mocha';
import {suite, test} from 'mocha';
import DataStore from './data-store.js';
import MemoryStore from './memory-store.js';
import RefValue from './ref-value.js';
import Struct from './struct.js';
import test from './async-test.js';
import {Field, makeCompoundType, makePrimitiveType, makeStructType, makeType} from './type.js';
import {flatten, flattenParallel} from './test-util.js';
import {invariant, notNull} from './assert.js';