Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7fccd49

Browse files
authoredJul 2, 2022
update test file
1 parent f4f161d commit 7fccd49

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed
 

‎test/index.js

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import test from 'tape';
2-
import fn from '../src';
3-
import { clsx } from '../src';
2+
import * as mod from '../src';
43

5-
test('clsx', t => {
6-
t.is(typeof fn, 'function', 'exports a function');
7-
t.is(typeof fn(), 'string', '~> returns string output');
8-
t.is(fn, clsx, "named import available");
9-
t.is(typeof clsx, "function", "exports a named function");
10-
t.is(typeof clsx(), "string", "~> returns string output");
4+
const fn = mod.default;
5+
6+
test('exports', t => {
7+
t.is(typeof mod.default, 'function', 'exports default function');
8+
t.is(typeof mod.clsx, 'function', 'exports named function');
9+
t.ok(mod.default === mod.clsx, 'exports are equal');
10+
11+
t.is(typeof mod.default(), 'string', '~> returns string output');
12+
t.is(typeof mod.clsx(), 'string', '~> returns string output');
13+
1114
t.end();
1215
});
1316

0 commit comments

Comments
 (0)
Please sign in to comment.