1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
Description: replace ava by tape
Author: Xavier Guimard <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2020-11-03
--- a/test/test.js
+++ b/test/test.js
@@ -1,7 +1,7 @@
'use strict';
-import path from 'path';
-import test from 'ava';
-import readPackage from '..';
+const path = require('path');
+const test = require('tape');
+const readPackage = require('..');
process.chdir(__dirname);
@@ -10,21 +10,25 @@
test('async', async t => {
const package_ = await readPackage();
t.is(package_.name, 'unicorn');
- t.truthy(package_._id);
+ t.ok(package_._id);
+ t.end();
});
test('async - cwd option', async t => {
const package_ = await readPackage({cwd: rootCwd});
t.is(package_.name, 'read-pkg');
+ t.end();
});
test('sync', t => {
const package_ = readPackage.sync();
t.is(package_.name, 'unicorn');
- t.truthy(package_._id);
+ t.ok(package_._id);
+ t.end();
});
test('sync - cwd option', t => {
const package_ = readPackage.sync({cwd: rootCwd});
t.is(package_.name, 'read-pkg');
+ t.end();
});
|