Skip to content
This repository was archived by the owner on Feb 9, 2018. It is now read-only.

Test cleanup #153

Merged
merged 4 commits into from
Sep 13, 2016
Merged

Test cleanup #153

merged 4 commits into from
Sep 13, 2016

Conversation

samthor
Copy link
Contributor

@samthor samthor commented Sep 13, 2016

Cleans up tests code. Uses assert.throws, not throw; changes to closeTo from approximate.

Also adds regex error matching, including adding a few message matches where there were none.

var valueErr = /^CSSUnparsedValue should be an array of string or CSSVariableReferenceValue$/;
assert.throws(function() { new CSSUnparsedValue(1); }, TypeError, valueErr);
assert.throws(function() { new CSSUnparsedValue("123"); }, TypeError, valueErr);
assert.throws(function() { new CSSUnparsedValue({ h:10, w:5, d:4, t:"5" });}, TypeError, valueErr);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Should not have space after { or before } in objects, should have space between : and following thing, e.g. {h: 10, w: 5}

@wilddamon
Copy link
Contributor

LGTM with small nit

@samthor samthor merged commit c1f7ee0 into css-typed-om:master Sep 13, 2016
@samthor samthor deleted the test-cleanup branch September 13, 2016 05:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants