Skip to content

Commit

Permalink
Updated testProp() and testAllProps() tests to cover value testin…
Browse files Browse the repository at this point in the history
…g and removed some unneeded dependencies
  • Loading branch information
stucox committed Feb 26, 2013
1 parent 1ca3a01 commit b850d2c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/testProps.js
@@ -1,4 +1,4 @@
define(['contains', 'mStyle', 'createElement', 'nativeTestProps', 'is', 'injectElementWithStyles', 'getComputedStyle'], function( contains, mStyle, createElement, nativeTestProps, is, injectElementWithStyles, getComputedStyle ) {
define(['contains', 'mStyle', 'createElement', 'nativeTestProps', 'is'], function( contains, mStyle, createElement, nativeTestProps, is ) {
// testProps is a generic CSS / DOM property test.

// In testing support for a given CSS property, it's legit to test:
Expand Down
12 changes: 12 additions & 0 deletions test/js/unit.js
Expand Up @@ -462,6 +462,12 @@ test('Modernizr.testProp()',function(){
Modernizr.testProp('pointerEvents'),
'results for `pointer-events` are consistent with a homegrown feature test');

// Native detection tests

equal(true, Modernizr.testProp('display'), 'Everyone supports display');
equal(true, Modernizr.testProp('display', 'block'), 'Everyone supports display:block');
equal(false, Modernizr.testProp('display', 'penguin'), 'Nobody supports display:penguin');

});


Expand All @@ -478,6 +484,12 @@ test('Modernizr.testAllProps()',function(){

equal(Modernizr.csscolumns, Modernizr.testAllProps('columnCount'), 'Modernizr result matches API result: csscolumns')

// Native detection tests

equal(true, Modernizr.testAllProps('display'), 'Everyone supports display');
equal(true, Modernizr.testAllProps('display', 'block'), 'Everyone supports display:block');
equal(false, Modernizr.testAllProps('display', 'penguin'), 'Nobody supports display:penguin');

});


Expand Down

0 comments on commit b850d2c

Please sign in to comment.