Skip to content

Commit

Permalink
chore: tests w/ esm hook
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed May 30, 2020
1 parent 3c6aa3f commit 0287e40
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -19,7 +19,7 @@
"scripts": {
"build": "bundt",
"pretest": "npm run build",
"test": "tape test/*.js | tap-spec"
"test": "tape -r esm test/*.js | tap-spec"
},
"files": [
"*.d.ts",
Expand All @@ -32,6 +32,7 @@
],
"devDependencies": {
"bundt": "1.0.1",
"esm": "3.2.25",
"tap-spec": "5.0.0",
"tape": "4.9.1"
}
Expand Down
4 changes: 2 additions & 2 deletions test/classnames.js
Expand Up @@ -2,8 +2,8 @@
* Ported from `classnames` for compatibility checks.
*/

const test = require('tape');
const fn = require('../dist/clsx');
import test from 'tape';
import fn from '../src';

test('(compat) keeps object keys with truthy values', t => {
const out = fn({ a:true, b:false, c:0, d:null, e:undefined, f:1 });
Expand Down
4 changes: 2 additions & 2 deletions test/index.js
@@ -1,5 +1,5 @@
const test = require('tape');
const fn = require('../dist/clsx');
import test from 'tape';
import fn from '../src';

test('clsx', t => {
t.is(typeof fn, 'function', 'exports a function');
Expand Down

0 comments on commit 0287e40

Please sign in to comment.