Skip to content

Commit

Permalink
update test file
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed Jul 2, 2022
1 parent f4f161d commit 7fccd49
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import test from 'tape';
import fn from '../src';
import { clsx } from '../src';
import * as mod from '../src';

test('clsx', t => {
t.is(typeof fn, 'function', 'exports a function');
t.is(typeof fn(), 'string', '~> returns string output');
t.is(fn, clsx, "named import available");
t.is(typeof clsx, "function", "exports a named function");
t.is(typeof clsx(), "string", "~> returns string output");
const fn = mod.default;

test('exports', t => {
t.is(typeof mod.default, 'function', 'exports default function');
t.is(typeof mod.clsx, 'function', 'exports named function');
t.ok(mod.default === mod.clsx, 'exports are equal');

t.is(typeof mod.default(), 'string', '~> returns string output');
t.is(typeof mod.clsx(), 'string', '~> returns string output');

t.end();
});

Expand Down

0 comments on commit 7fccd49

Please sign in to comment.