From e300cd5236d238fcc3d638d4c481af017d2c623a Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 27 Sep 2016 21:15:45 +0100 Subject: Expect end token when parsing style mappings --- test/style-reader.tests.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/style-reader.tests.js b/test/style-reader.tests.js index 19f9c00..ec17e3a 100644 --- a/test/style-reader.tests.js +++ b/test/style-reader.tests.js @@ -162,6 +162,13 @@ test("styleReader.read", { to: htmlPaths.empty } ); + }, + + "error when not all input is consumed": function() { + assert.deepEqual( + readStyle("r => span a"), + new results.Result(null, [results.warning("Did not understand this style mapping, so ignored it: r => span a\nError was at character number 10: Expected end but got whitespace")]) + ); } }); -- cgit v1.2.3