sh-core
Advanced tools
Comparing version 0.1.22 to 0.2.0
@@ -176,3 +176,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
if (!value) { | ||
return null; | ||
return 0; | ||
} | ||
@@ -179,0 +179,0 @@ |
{ | ||
"name": "sh-core", | ||
"version": "0.1.22", | ||
"version": "0.2.0", | ||
"description": "Base SASS and React files for SuperheroUI components", | ||
@@ -5,0 +5,0 @@ "main": "bin/sh-core.js", |
@@ -12,3 +12,3 @@ import * as _ from 'lodash'; | ||
if (!value) { | ||
return null; | ||
return 0; | ||
} | ||
@@ -15,0 +15,0 @@ |
@@ -1,2 +0,2 @@ | ||
var getClassNames = require('./get-decimal').default; | ||
var getDecimal = require('./get-decimal').default; | ||
@@ -8,2 +8,34 @@ describe('getDecimal', function() { | ||
}); | ||
it('works on a number', function() { | ||
var classes = getDecimal(.123); | ||
expect(classes).toBe(0.123); | ||
}); | ||
it('works on a negative', function() { | ||
var classes = getDecimal(-.123); | ||
expect(classes).toBe(-0.123); | ||
}); | ||
it('works on a zero', function() { | ||
var classes = getDecimal(0); | ||
expect(classes).toBe(0); | ||
}); | ||
it('works with letters', function() { | ||
var classes = getDecimal('abc'); | ||
expect(classes).toBe(0); | ||
}); | ||
it('works with negative strings', function() { | ||
var classes = getDecimal('-1'); | ||
expect(classes).toBe(-1); | ||
}); | ||
it('works with specials', function() { | ||
var classes = getDecimal('!@@#$%^&*()`~_+'); | ||
expect(classes).toBe(0); | ||
}); | ||
it('works with nothing', function() { | ||
var classes = getDecimal(); | ||
expect(classes).toBe(0); | ||
}); | ||
it('works with something', function() { | ||
var classes = getDecimal(99999999999999999999999999999999999999999999999999999999999999999999999999999999999); | ||
expect(classes).toBe(99999999999999999999999999999999999999999999999999999999999999999999999999999999999); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3028745
48
868