|
|
@@ -1,18 +1,27 @@ |
|
|
|
import { css, CssIfStringImpl, CssStringImpl } from '.'; |
|
|
|
import { |
|
|
|
css, |
|
|
|
CssIfStringImpl, |
|
|
|
CssStringImpl, |
|
|
|
setup, |
|
|
|
extractCss, |
|
|
|
} from '.'; |
|
|
|
import { |
|
|
|
vi, |
|
|
|
describe, |
|
|
|
it, |
|
|
|
expect, |
|
|
|
} from 'vitest'; |
|
|
|
import { setup as setupGoober, extractCss as extractCssGoober } from 'goober'; |
|
|
|
|
|
|
|
vi.mock('goober', () => { |
|
|
|
return { |
|
|
|
css: () => 'gooberClass', |
|
|
|
setup: vi.fn(), |
|
|
|
extractCss: vi.fn(), |
|
|
|
}; |
|
|
|
}); |
|
|
|
|
|
|
|
describe('css-utils', () => { |
|
|
|
describe('@tesseract-design/goofy-goober', () => { |
|
|
|
describe('css', () => { |
|
|
|
it('should return CssString', () => { |
|
|
|
const c = css` |
|
|
@@ -140,4 +149,22 @@ describe('css-utils', () => { |
|
|
|
).toBe('class1 class2 gooberClass'); |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
describe('setup', () => { |
|
|
|
it('should call setup from goober', () => { |
|
|
|
const pragma = vi.fn(); |
|
|
|
const prefixer = vi.fn(); |
|
|
|
setup(pragma, prefixer); |
|
|
|
|
|
|
|
expect(setupGoober).toHaveBeenCalledWith(pragma, prefixer); |
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
describe('extractCss', () => { |
|
|
|
it('should call extractCss from goober', () => { |
|
|
|
extractCss(); |
|
|
|
|
|
|
|
expect(extractCssGoober).toHaveBeenCalled(); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}); |