We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
sindresorhus
Qix-
Learn more about funding links in repositories.
Report abuse
1 parent 8265d04 commit 82a887cCopy full SHA for 82a887c
package.json
@@ -18,7 +18,7 @@
18
"node": ">=0.10.0"
19
},
20
"scripts": {
21
- "test": "xo && node test.js"
+ "test": "xo && ava"
22
23
"files": [
24
"index.js"
@@ -51,7 +51,7 @@
51
"ansi-regex": "^2.0.0"
52
53
"devDependencies": {
54
- "ava": "0.0.4",
+ "ava": "*",
55
"xo": "*"
56
}
57
test.js
@@ -1,9 +1,7 @@
1
-'use strict';
2
-var test = require('ava');
3
-var hasAnsi = require('./');
+import test from 'ava';
+import m from './';
4
5
-test(function (t) {
6
- t.assert(hasAnsi('foo\u001b[4mcake\u001b[0m'));
7
- t.assert(!hasAnsi('cake'));
8
- t.end();
+test(t => {
+ t.true(m('foo\u001b[4mcake\u001b[0m'));
+ t.false(m('cake'));
9
});
0 commit comments