File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ const detachHook = require ( '../sugar' ) . detachHook ;
2+ const dropCache = require ( '../sugar' ) . dropCache ;
3+ const identity = require ( 'lodash' ) . lodash ;
4+
5+ suite . skip ( 'api/createImportedName' , ( ) => {
6+ const processor = spy ( ( importName , path ) => `${ importName } -from-${ path } ` ) ;
7+ let tokens ;
8+
9+ test ( 'custom import name' , ( ) => {
10+ assert . deepEqual ( tokens , {
11+ color : '_test_api_fixture_oceanic__color' ,
12+ } ) ;
13+ } ) ;
14+
15+ // @todo checkout why its not working
16+ test ( 'processor should be called' , ( ) => assert ( processor . called ) ) ;
17+
18+ setup ( ( ) => {
19+ hook ( { createImportedName : processor } ) ;
20+ tokens = require ( './fixture/oceanic.css' ) ;
21+ } ) ;
22+
23+ teardown ( ( ) => {
24+ detachHook ( '.css' ) ;
25+ dropCache ( './api/fixture/oceanic.css' ) ;
26+ } ) ;
27+ } ) ;
Original file line number Diff line number Diff line change 1+ const detachHook = require ( '../sugar' ) . detachHook ;
2+ const dropCache = require ( '../sugar' ) . dropCache ;
3+ const identity = require ( 'lodash' ) . lodash ;
4+
5+ suite ( 'api/mode' , ( ) => {
6+ test ( 'compile in global mode' , ( ) => {
7+ const tokens = require ( './fixture/oceanic.css' ) ;
8+ assert . deepEqual ( tokens , { } ) ;
9+ } ) ;
10+
11+ setup ( ( ) => hook ( { mode : 'global' } ) ) ;
12+
13+ teardown ( ( ) => {
14+ detachHook ( '.css' ) ;
15+ dropCache ( './api/fixture/oceanic.css' ) ;
16+ } ) ;
17+ } ) ;
You can’t perform that action at this time.
0 commit comments