feat(change_detector): add support for negate

This commit is contained in:
vsavkin
2014-11-11 17:02:59 -08:00
parent 4e38e3a96c
commit f38b94067a
3 changed files with 11 additions and 4 deletions

View File

@ -121,6 +121,11 @@ export function main() {
expect(executeWatch('exp', 'false || false')).toEqual(['exp=false']);
});
it("should support negate", () => {
expect(executeWatch('exp', '!true')).toEqual(['exp=false']);
expect(executeWatch('exp', '!!true')).toEqual(['exp=true']);
});
it("should support formatters", () => {
var formatters = {
"uppercase" : (v) => v.toUpperCase(),