aboutsummaryrefslogtreecommitdiff
path: root/src/wallet-test.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-27 19:20:27 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-27 19:20:27 +0200
commit9a1b2c8ccc5f079dae4966dfd011f4076a53dc20 (patch)
tree961e2d42c69126791b9e890fa971f0f33ded1920 /src/wallet-test.ts
parent592fd62402b7f0fdb8dbe08605381d3a74d929f2 (diff)
convert tests to ava tests
Diffstat (limited to 'src/wallet-test.ts')
-rw-r--r--src/wallet-test.ts22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/wallet-test.ts b/src/wallet-test.ts
index e317c3bd9..56b5e6027 100644
--- a/src/wallet-test.ts
+++ b/src/wallet-test.ts
@@ -1,9 +1,9 @@
-import {test, TestLib} from "talertest";
+import {test} from "ava";
import {mkAmount} from "./types";
import * as wallet from "./wallet";
-test("coin selection 1", (t: TestLib) => {
+test("coin selection 1", t => {
let cds: any = [];
cds.push({
coin: {
@@ -29,12 +29,12 @@ test("coin selection 1", (t: TestLib) => {
t.fail();
return;
}
- t.assert(res.length == 2);
+ t.true(res.length == 2);
t.pass();
});
-test("coin selection 2", (t: TestLib) => {
+test("coin selection 2", t => {
let cds: any = [];
cds.push({
coin: {
@@ -70,12 +70,12 @@ test("coin selection 2", (t: TestLib) => {
t.fail();
return;
}
- t.assert(res.length == 2);
+ t.true(res.length == 2);
t.pass();
});
-test("coin selection 2", (t: TestLib) => {
+test("coin selection 2", t => {
let cds: any = [];
cds.push({
coin: {
@@ -110,13 +110,13 @@ test("coin selection 2", (t: TestLib) => {
t.fail();
return;
}
- t.assert(res.length == 2);
+ t.true(res.length == 2);
t.pass();
});
-test("coin selection 3", (t: TestLib) => {
+test("coin selection 3", t => {
let cds: any = [];
cds.push({
coin: {
@@ -151,12 +151,12 @@ test("coin selection 3", (t: TestLib) => {
t.fail();
return;
}
- t.assert(res.length == 3);
+ t.true(res.length == 3);
t.pass();
});
-test("coin selection 3", (t: TestLib) => {
+test("coin selection 3", t => {
let cds: any = [];
cds.push({
coin: {
@@ -187,7 +187,7 @@ test("coin selection 3", (t: TestLib) => {
});
let res = wallet.selectCoins(cds, mkAmount(4,0,"EUR"), mkAmount(0,2,"EUR"));
- t.assert(!res);
+ t.true(!res);
t.pass();
});