File tree 1 file changed +11
-8
lines changed
1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 1
1
import test from 'tape' ;
2
- import fn from '../src' ;
3
- import { clsx } from '../src' ;
2
+ import * as mod from '../src' ;
4
3
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
+
11
14
t . end ( ) ;
12
15
} ) ;
13
16
You can’t perform that action at this time.
0 commit comments