import * as tape from 'tape' ; import * as ClassNameGenerator from '../src/ClassNameGenerator' ; tape . test ( 'ClassNameGenerator' , t => { const generator = ClassNameGenerator . createClassNameGenerator ( ) ; t . deepEqual ( [ generator . nextClassName ( ) , generator . nextClassName ( ) , generator . nextClassName ( ) ] , [ 'a' , 'b' , 'c' ] , '`generator.nextClassName` should generate class name in the alphebetical order' ) ; t . equal ( generator . getCurrCSSKey ( ) , 3 , '`generator.getCurrCSSKey` should return a number equals to the number of `nextClassName` call' ) ; t . equal ( ClassNameGenerator . createClassNameGenerator ( 3 ) . nextClassName ( ) , 'd' , 'if the generator is created with a key as argument call to `nextClassName` should return subsequent key in the order ' ) ; t . end ( ) ; } ) ;