You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to setup front end testing for our new Soy portlets and I am stuck on this error.
Chrome 60.0.3112 (Windows 10 0.0.0) ERROR: 'goog.require could not find: soy.idom'
Chrome 60.0.3112 (Windows 10 0.0.0) ERROR
Uncaught Error: goog.require could not find: soy.idom
at node_modules/metal-soy-bundle/build/bundle.js:612
[12:19:19] 'test:unit' errored after 9.57 s
[12:19:19] Error in plugin 'gulp-metal'
Message:
Karma has exited with 1
[12:19:19] Finished 'test' after 11 s
npm ERR! Test failed. See above for more details.
The test itself isn't related to any components/modules but is just a simple test to try and get it to work.
describe("First Test", function () {
var counter;
beforeEach(function () {
counter = 0;
});
it("increments value", function () {
counter++;
expect(counter).toEqual(1);
});
it("decrements value", function () {
counter--;
expect(counter).toEqual(0);
});
});
Since the portlet I am working on isn't a pure Soy portlet but is build on JSP's I am using Soy templates with MetalJS when building a new module and that is working without any problems.
Another weird thing that happens when I run npm test is all my JS and Soy files get compiled into soy.js files of their respective components.
My gulpfile.js is as follows:
let metal = require('gulp-metal');
metal.registerTasks({
moduleName: 'osb-lcs-web'
});
Trying to setup front end testing for our new Soy portlets and I am stuck on this error.
I've tried having the
test
folder in several locations, including the root of the portlet (same depth as thesrc
folder) and in thesrc/main/resources/META-INF/resources
where our code is located (split into different modules as you can see on my repo (https://github.com/kresimir-coko/com-liferay-osb-lcs-private/tree/research/osb-lcs-web).The test itself isn't related to any components/modules but is just a simple test to try and get it to work.
Since the portlet I am working on isn't a pure Soy portlet but is build on JSP's I am using Soy templates with MetalJS when building a new module and that is working without any problems.
Another weird thing that happens when I run
npm test
is all my JS and Soy files get compiled intosoy.js
files of their respective components.My
gulpfile.js
is as follows:And
package.json
:The text was updated successfully, but these errors were encountered: