From 82a887c12e21c6110c2f697db050a9901b7f2117 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Fri, 1 Jan 2016 01:42:41 +0100 Subject: [PATCH] update tests for latest AVA version --- package.json | 4 ++-- test.js | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 8f32f7f..79f6cc0 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "node": ">=0.10.0" }, "scripts": { - "test": "xo && node test.js" + "test": "xo && ava" }, "files": [ "index.js" @@ -51,7 +51,7 @@ "ansi-regex": "^2.0.0" }, "devDependencies": { - "ava": "0.0.4", + "ava": "*", "xo": "*" } } diff --git a/test.js b/test.js index 1374c50..ba3b695 100644 --- a/test.js +++ b/test.js @@ -1,9 +1,7 @@ -'use strict'; -var test = require('ava'); -var hasAnsi = require('./'); +import test from 'ava'; +import m from './'; -test(function (t) { - t.assert(hasAnsi('foo\u001b[4mcake\u001b[0m')); - t.assert(!hasAnsi('cake')); - t.end(); +test(t => { + t.true(m('foo\u001b[4mcake\u001b[0m')); + t.false(m('cake')); });