-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c9ece5
commit b4a5d0c
Showing
6 changed files
with
40 additions
and
178 deletions.
There are no files selected for viewing
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
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
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
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 |
---|---|---|
@@ -1,29 +1,27 @@ | ||
/* global describe, it */ | ||
'use strict'; | ||
import {expect} from 'chai'; | ||
import isCssProperty from '../lib/'; | ||
'use strict' | ||
import {expect} from 'chai' | ||
import isCssProperty from '../lib/' | ||
|
||
describe('is-css-property', () => { | ||
it('should throw a TypeError if property is a string', () => { | ||
function test() { | ||
isCssProperty(); | ||
} | ||
const test = () => isCssProperty() | ||
|
||
expect(test).to.throw(TypeError, /Expected property to be a string/); | ||
}); | ||
expect(test).to.throw(TypeError, /Expected property to be a string/) | ||
}) | ||
|
||
it('should return false if property is not a valid CSS property', () => { | ||
expect(isCssProperty('abe')).to.eql(false); | ||
expect(isCssProperty('lincoln')).to.eql(false); | ||
}); | ||
expect(isCssProperty('abe')).to.eql(false) | ||
expect(isCssProperty('lincoln')).to.eql(false) | ||
}) | ||
|
||
it('should return true if property is a valid CSS property', () => { | ||
expect(isCssProperty('color')).to.eql(true); | ||
expect(isCssProperty('float')).to.eql(true); | ||
}); | ||
expect(isCssProperty('color')).to.eql(true) | ||
expect(isCssProperty('float')).to.eql(true) | ||
}) | ||
|
||
it('should lower case property', () => { | ||
expect(isCssProperty('COLOR')).to.eql(true); | ||
expect(isCssProperty('fLoAt')).to.eql(true); | ||
}); | ||
}); | ||
expect(isCssProperty('COLOR')).to.eql(true) | ||
expect(isCssProperty('fLoAt')).to.eql(true) | ||
}) | ||
}) |