-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more unit tests for color package (#28)
* add more unit tests for color package * revert file name * rename
- Loading branch information
1 parent
86f0007
commit 166de54
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
...end/temporary_superset_ui/superset-ui/packages/superset-ui-color/test/ColorScheme.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import ColorScheme from '../src/ColorScheme'; | ||
|
||
describe('ColorScheme', () => { | ||
describe('new ColorScheme()', () => { | ||
it('requires name and color', () => { | ||
expect(() => new ColorScheme()).toThrow(); | ||
expect(() => new ColorScheme({ name: 'test' })).toThrow(); | ||
expect(() => new ColorScheme({ colors: ['red', 'blue'] })).toThrow(); | ||
}); | ||
it('returns an instance of ColorScheme', () => { | ||
const scheme = new ColorScheme({ name: 'test', colors: ['red', 'blue'] }); | ||
expect(scheme).toBeInstanceOf(ColorScheme); | ||
}); | ||
}); | ||
}); |
File renamed without changes.