Skip to content

Commit

Permalink
Remove usage of power-assert
Browse files Browse the repository at this point in the history
Fixes #73
  • Loading branch information
dubzzz committed Apr 13, 2018
1 parent 57c7085 commit 6af9e6b
Show file tree
Hide file tree
Showing 40 changed files with 42 additions and 42 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"coverage": "nyc report --reporter=text-lcov | coveralls",
"codeclimate": "nyc report --reporter=text-lcov | codeclimate-test-reporter",
"format:check": "prettier --list-different \"**/*.ts\"",
"format:fix": "prettier --write \"**/*.ts\"",
"format:fix": "prettier --write \"**/*.ts\"",
"lint:check": "tslint --project tsconfig.json",
"lint:fix": "tslint --project tsconfig.json --fix"
},
Expand All @@ -35,13 +35,11 @@
"devDependencies": {
"@types/mocha": "^5.0.0",
"@types/node": "^9.6.1",
"@types/power-assert": "^1.4.29",
"browserify": "^16.1.1",
"codeclimate-test-reporter": "^0.5.0",
"coveralls": "^3.0.0",
"mocha": "^5.0.5",
"nyc": "^11.6.0",
"power-assert": "^1.5.0",
"prettier": "^1.11.1",
"source-map-support": "^0.5.4",
"ts-node": "^5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion prebuild/property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const generatePropertySpec = (num: number, isAsync: boolean): string => {
const className = isAsync ? 'AsyncProperty' : 'Property';
const blocks = [
// imports
`import * as assert from 'power-assert';`,
`import * as assert from 'assert';`,
`import * as stubArb from '../../stubs/arbitraries';`,
`import * as stubRng from '../../stubs/generators';`,
`import { ${functionName} } from '../../../../src/check/property/${className}';`,
Expand Down
4 changes: 3 additions & 1 deletion src/check/arbitrary/SetArbitrary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ function set<T>(
? compareFn
: typeof bLength === 'function'
? (bLength as (a: T, b: T) => boolean)
: typeof aLength === 'function' ? (aLength as (a: T, b: T) => boolean) : (a: T, b: T) => a === b;
: typeof aLength === 'function'
? (aLength as (a: T, b: T) => boolean)
: (a: T, b: T) => a === b;

const arrayArb = new ArrayArbitrary<T>(arb, minLength, maxLength, buildCompareFilter(compare));
if (minLength === 0) return arrayArb;
Expand Down
2 changes: 1 addition & 1 deletion src/check/property/IProperty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export default interface IProperty<Ts> {
isAsync(): boolean;
generate(mrng: Random): Shrinkable<Ts>;
run(v: Ts): Promise<string | null> | (string | null);
};
}
2 changes: 1 addition & 1 deletion test/e2e/GenerateAllValues.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import prand from 'pure-rand';
import fc from '../../src/fast-check';

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/ReplayFailures.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../src/fast-check';

const seed = Date.now();
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/Shadows.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../src/fast-check';

// Code under tests
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/arbitraries/ArrayArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../src/fast-check';

const seed = Date.now();
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/arbitraries/CharacterArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../src/fast-check';

const seed = Date.now();
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/arbitraries/IntegerArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../src/fast-check';

const seed = Date.now();
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/arbitraries/ObjectArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../src/fast-check';

const seed = Date.now();
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/arbitraries/OneOfArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../src/fast-check';

const seed = Date.now();
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/arbitraries/RecordArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../src/fast-check';

const seed = Date.now();
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/arbitraries/StringArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../src/fast-check';

const seed = Date.now();
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/arbitraries/TupleArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../src/fast-check';

const seed = Date.now();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/ArrayArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../lib/fast-check';

import Arbitrary from '../../../../src/check/arbitrary/definition/Arbitrary';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/BooleanArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../lib/fast-check';

import { boolean } from '../../../../src/check/arbitrary/BooleanArbitrary';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/CharacterArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../lib/fast-check';

import {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/ConstantArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../lib/fast-check';

import { constant, constantFrom } from '../../../../src/check/arbitrary/ConstantArbitrary';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/FloatingPointArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../lib/fast-check';

import Arbitrary from '../../../../src/check/arbitrary/definition/Arbitrary';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/FrequencyArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../lib/fast-check';

import { frequency } from '../../../../src/check/arbitrary/FrequencyArbitrary';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/IntegerArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../lib/fast-check';

import { integer, nat } from '../../../../src/check/arbitrary/IntegerArbitrary';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/LoremArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import prand from 'pure-rand';
import fc from '../../../../lib/fast-check';

Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/ObjectArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../lib/fast-check';

import Arbitrary from '../../../../src/check/arbitrary/definition/Arbitrary';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/OneOfArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../lib/fast-check';

import Arbitrary from '../../../../src/check/arbitrary/definition/Arbitrary';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/OptionArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import prand from 'pure-rand';
import fc from '../../../../lib/fast-check';

Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/RecordArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import prand from 'pure-rand';
import fc from '../../../../lib/fast-check';

Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/SetArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../lib/fast-check';

import Arbitrary from '../../../../src/check/arbitrary/definition/Arbitrary';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/StringArbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../lib/fast-check';

import {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/TupleArbitrary.generic.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../lib/fast-check';
import {
dummy,
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/TupleArbitrary.properties.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../lib/fast-check';

import Arbitrary from '../../../../src/check/arbitrary/definition/Arbitrary';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/arbitrary/definition/Arbitrary.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../../lib/fast-check';

import Arbitrary from '../../../../../src/check/arbitrary/definition/Arbitrary';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import prand from 'pure-rand';
import fc from '../../../../../lib/fast-check';

Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/property/AsyncProperty.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';

import Arbitrary from '../../../../src/check/arbitrary/definition/Arbitrary';
import { asyncProperty } from '../../../../src/check/property/AsyncProperty';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/property/Property.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';

import Arbitrary from '../../../../src/check/arbitrary/definition/Arbitrary';
import { property } from '../../../../src/check/property/Property';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/property/TimeoutProperty.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';

import Arbitrary from '../../../../src/check/arbitrary/definition/Arbitrary';
import { asyncProperty } from '../../../../src/check/property/AsyncProperty';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/runner/Runner.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../lib/fast-check';

import Shrinkable from '../../../../src/check/arbitrary/definition/Shrinkable';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/runner/Sampler.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import fc from '../../../../lib/fast-check';

import { sample, statistics } from '../../../../src/check/runner/Sampler';
Expand Down
2 changes: 1 addition & 1 deletion test/unit/random/generator/Random.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';
import prand from 'pure-rand';
import fc from '../../../../lib/fast-check';

Expand Down
2 changes: 1 addition & 1 deletion test/unit/stream/Stream.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as assert from 'power-assert';
import * as assert from 'assert';

import { Stream, stream } from '../../../src/stream/Stream';

Expand Down

0 comments on commit 6af9e6b

Please sign in to comment.