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
Hello, I'm trying to run your plugin, but I need help.
My structure:
build-dev/ <-- Generated by grunt
vendor/
js/
jquery.js
require.js
js/
model/
cache.js <-- File to be tested
tests/
cache.js <-- Test for a file
tests.js <-- like test-bootstrap.js
define(['chai', 'model/cache'], function(chai, cache) {
var should;
should = chai.should();
return describe('test suite 1', function() {
return it('should work', function() {
return cache.test().should.be.equal(5);
});
});
});
The problem is it's not working. It can't load model/cache. I was trying to change baseUrl in tests.js (like test-bootstrap.js). I was also trying to change baseUrl in grunt. I was trying to add path: 'model: ../../js/model', but it was ignored.
I need to call for a model as 'model/cache', how do I have to set up things to make it work?
The text was updated successfully, but these errors were encountered:
I notice you've got '../vendor/js/require.js' set as your requireLib property but your directory name is "vendors". I realise that might be a typo in your issue description but thought I'd check before I look into this deeply.
Thank you very much for answer. It's a typo, wen I was formating my input, I'm sorry for that. It works fine without dependency (model/test), it works fine when I call dependency like:
Hello, I'm trying to run your plugin, but I need help.
My structure:
My gruntfile config is:
My tests.js (test-bootstrap.js) is:
My tests/cache.js is:
The problem is it's not working. It can't load model/cache. I was trying to change baseUrl in tests.js (like test-bootstrap.js). I was also trying to change baseUrl in grunt. I was trying to add path: 'model: ../../js/model', but it was ignored.
I need to call for a model as 'model/cache', how do I have to set up things to make it work?
The text was updated successfully, but these errors were encountered: