Comparing version 0.21.7 to 0.21.8
@@ -84,4 +84,4 @@ (function (root, factory) { if (typeof define === 'function' && define.amd) { | ||
operator('|', VBoolean, 'or', 8, 'a||b'); | ||
operator('round', 'round', 8, 'Math.round(a*Math.pow(10,b||1))/Math.pow(10,b||1)', 'a', 'a'); | ||
operator('nint', VNumber, 'round', 8, 'Math.round(a*Math.pow(10,b||1)/Math.pow(10,b||1))', 'a', 'a'); | ||
return operators; | ||
})) |
{ | ||
"name": "alkali", | ||
"author": "Kris Zyp", | ||
"version": "0.21.7", | ||
"version": "0.21.8", | ||
"description": "Reactivity with native JavaScript objects and HTML elements", | ||
@@ -12,5 +12,4 @@ "license": "MIT", | ||
"scripts": { | ||
"build": "webpack", | ||
"test": "./node_modules/.bin/mocha tests/unit -u tdd", | ||
"test.sauce": "intern-runner config=tests/intern", | ||
"test.proxy": "intern-runner config=tests/intern --proxyOnly", | ||
"test.types": "./node_modules/.bin/tsc -p tests" | ||
@@ -28,4 +27,5 @@ }, | ||
"chai": "^4", | ||
"webpack": "^4.7.0" | ||
"webpack": "^4.7.0", | ||
"webpack-cli": "^3.3.3" | ||
} | ||
} |
@@ -38,3 +38,7 @@ define(function(require) { | ||
}) | ||
test('round', function() { | ||
assert.equal(operators.round(new Variable(2.345)).valueOf(), 2) | ||
assert.equal(operators.round(new Variable(2.567)).valueOf(), 3) | ||
}) | ||
}) | ||
}) |
@@ -49,2 +49,18 @@ define([ | ||
}) | ||
test('TextRenderer', function() { | ||
var div = document.createElement('div') | ||
var textNode = div.appendChild(document.createTextNode('')) | ||
document.body.appendChild(div); | ||
var variable = new Variable('start'); | ||
var renderer = new Renderer.TextRenderer({ | ||
variable: variable, | ||
element: div, | ||
textNode: textNode | ||
}); | ||
assert.equal(div.innerHTML, 'start'); | ||
variable.put('next'); | ||
return new Promise(requestAnimationFrame).then(function(){ | ||
assert.equal(div.innerHTML, 'next'); | ||
}); | ||
}) | ||
test('PromisedUpdate', function() { | ||
@@ -51,0 +67,0 @@ var resolvePromise; |
@@ -9,7 +9,7 @@ var webpack = require('webpack') | ||
}, | ||
plugins: [ | ||
new webpack.optimize.UglifyJsPlugin() | ||
], | ||
optimization: { | ||
minimize: true | ||
}, | ||
mode: 'production', | ||
devtool: 'source-map' | ||
}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
975855
46
12054
1366
7