Skip to content

Commit 0287e40

Browse files
committedMay 30, 2020
chore: tests w/ esm hook
1 parent 3c6aa3f commit 0287e40

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed
 

‎package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"scripts": {
2020
"build": "bundt",
2121
"pretest": "npm run build",
22-
"test": "tape test/*.js | tap-spec"
22+
"test": "tape -r esm test/*.js | tap-spec"
2323
},
2424
"files": [
2525
"*.d.ts",
@@ -32,6 +32,7 @@
3232
],
3333
"devDependencies": {
3434
"bundt": "1.0.1",
35+
"esm": "3.2.25",
3536
"tap-spec": "5.0.0",
3637
"tape": "4.9.1"
3738
}

‎test/classnames.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
* Ported from `classnames` for compatibility checks.
33
*/
44

5-
const test = require('tape');
6-
const fn = require('../dist/clsx');
5+
import test from 'tape';
6+
import fn from '../src';
77

88
test('(compat) keeps object keys with truthy values', t => {
99
const out = fn({ a:true, b:false, c:0, d:null, e:undefined, f:1 });

‎test/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const test = require('tape');
2-
const fn = require('../dist/clsx');
1+
import test from 'tape';
2+
import fn from '../src';
33

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

0 commit comments

Comments
 (0)
Please sign in to comment.