Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(695)

Unified Diff: node_modules/vulcanize/test/test.js

Issue 877193002: Upgrade vulcanize to 0.7.6. (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « node_modules/vulcanize/package.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: node_modules/vulcanize/test/test.js
diff --git a/node_modules/vulcanize/test/test.js b/node_modules/vulcanize/test/test.js
index 60c011de2774eb9e449c6148d05cdd86ef381363..b3d213d8c1c4c3ddcf2def242325c03f63d5b236 100644
--- a/node_modules/vulcanize/test/test.js
+++ b/node_modules/vulcanize/test/test.js
@@ -29,6 +29,7 @@ suite('constants', function() {
assert(abs.test('sms:1-123-123456'), 'sms');
assert(abs.test('//foo.com'), 'protocol-free');
assert(abs.test('/components/'), '/');
+ assert(abs.test('#foo'), 'hash url');
assert(!abs.test('../foo/bar.html'), '../');
assert(!abs.test('bar.html'), 'sibling dependency');
});
@@ -113,6 +114,7 @@ suite('Path Resolver', function() {
testPath('biz.jpg', 'my-element/biz.jpg', null, 'local');
testPath('http://foo/biz.jpg', 'http://foo/biz.jpg', null, 'remote');
+ testPath('#foo', '#foo', null, 'hash');
testPath('biz.jpg', 'bar/my-element/biz.jpg', '/foo/', 'build path');
});
@@ -500,6 +502,7 @@ suite('Vulcan', function() {
process({inputSrc: input, output: outputPath, strip: true}, function(outputs) {
var vulcanized = outputs[outputPath];
assert(vulcanized);
+ assert(vulcanized.indexOf('{{ foo }}') > -1, 'braces kept');
assert(vulcanized.indexOf(input.replace(/[\r\n]/g, '')) > -1, 'newlines removed at least');
done();
});
@@ -521,6 +524,17 @@ suite('Vulcan', function() {
});
});
+ test('keep fallback declarations', function(done) {
+ var options = {inputSrc: '<style>div { display: flex; display: -webkit-flex; }</style>', output: outputPath, strip: true};
+ process(options, function(outputs) {
+ var vulcanized = outputs[outputPath];
+ assert(vulcanized);
+ assert(vulcanized.indexOf('display: flex') > -1, 'keep flex');
+ assert(vulcanized.indexOf('display: -webkit-flex') > -1, 'keep -webkit-flex');
+ done();
+ });
+ });
+
});
test('Multiple Polymer Invocations', function(done) {
« no previous file with comments | « node_modules/vulcanize/package.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698