chyingp / grunt-inline

Brings externally referenced resources, such as js, css and images, into a single file.
MIT License
86 stars 55 forks source link

Tests fail - Not working #13

Closed jmealo closed 10 years ago

jmealo commented 10 years ago

Kudos @chyingp !

I was looking forward to using your Grunt Task. However, it isn't working with Node.js v0.10.26 on Ubuntu 12.04 with the latest grunt.

The tests fail. In addition and when I try to include JavaScript files the files aren't being included (no changes are being made to the output).

It's unclear whether the relative paths are in relation to the source file, destination file or where Grunt is being run from. I tried all three in addition to a remote file via http.

Please advise.

NPM Test Output:

> grunt-inline@0.2.4 test /home/jmealo/repos/browser-plugins/node_modules/grunt-inline
> grunt test

Running "clean:tests" (clean) task
Cleaning "tmp/"...OK

Running "inline:dist" (inline) task
Processing test/dist/css.html...OK
Processing test/dist/css_greedy.html...OK
Processing test/dist/html.html...OK
Processing test/dist/html_greedy.html...OK
Processing test/dist/img.html...OK
Processing test/dist/img_greedy.html...OK
Processing test/dist/script.html...OK
Processing test/dist/script_greedy.html...OK

Running "htmlmin:dist" (htmlmin) task
File tmp/css.min.html created.
File tmp/img.min.html created.
File tmp/html.min.html created.
File tmp/script.min.html created.
File tmp/css_greedy.min.html created.
File tmp/img_greedy.min.html created.
File tmp/html_greedy.min.html created.
File tmp/script_greedy.min.html created.

Running "nodeunit:tests" (nodeunit) task
Testing greedy_test.jsF
>> inline
>> Message: Should compile two link target without newline characters
>> Error: '<!DOCTYPE html><html><head><title>test</title><style>.main{border: none;}\nbody{background: !!!!! REDACTED GITHUB LIMITED LENGTH OF POST !!!!d: )</style></head><body></body></html>'
>> at assertFileEquality (test/inline_test.js:19:10)
>> at Object.exports.inline (test/inline_test.js:27:5)

Warning: 2/8 assertions failed (11ms) Use --force to continue.

Aborted due to warnings.
npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0
jmealo commented 10 years ago

Closing in favor of: #14