aboutsummaryrefslogtreecommitdiffstats
path: root/packages/theme/test
diff options
context:
space:
mode:
Diffstat (limited to 'packages/theme/test')
-rw-r--r--packages/theme/test/index.test.js17
-rw-r--r--packages/theme/test/index.test.ts19
2 files changed, 19 insertions, 17 deletions
diff --git a/packages/theme/test/index.test.js b/packages/theme/test/index.test.js
deleted file mode 100644
index 3906433c1..000000000
--- a/packages/theme/test/index.test.js
+++ /dev/null
@@ -1,17 +0,0 @@
1const expect = require('expect.js');
2
3const { colorBackground: colorBackgroundDefault } = require('../lib/themes/default');
4const { colorBackground: colorBackgroundDark } = require('../lib/themes/dark');
5const { default: theme } = require('../lib');
6
7describe('Load theme', () => {
8 it('Should load default theme', () => {
9 const { colorBackground } = theme('default');
10 expect(colorBackground).to.be(colorBackgroundDefault);
11 });
12
13 it('Should load dark theme', () => {
14 const { colorBackground } = theme('dark');
15 expect(colorBackground).to.be(colorBackgroundDark);
16 });
17});
diff --git a/packages/theme/test/index.test.ts b/packages/theme/test/index.test.ts
new file mode 100644
index 000000000..7eda4e359
--- /dev/null
+++ b/packages/theme/test/index.test.ts
@@ -0,0 +1,19 @@
1import expect from 'expect.js';
2
3import makeDefaultThemeConfig from '../src/themes/default';
4import makeDarkThemeConfig from '../src/themes/dark';
5import { theme, ThemeType } from '../src';
6
7describe('Load theme', () => {
8 it('Should load default theme', () => {
9 const { colorBackground } = theme('default' as ThemeType);
10 expect(colorBackground).to.be(
11 makeDefaultThemeConfig('default').colorBackground,
12 );
13 });
14
15 it('Should load dark theme', () => {
16 const { colorBackground } = theme('dark' as ThemeType);
17 expect(colorBackground).to.be(makeDarkThemeConfig('dark').colorBackground);
18 });
19});