mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
23 lines
1021 B
JavaScript
23 lines
1021 B
JavaScript
Tinytest.add('modules', function (test) {
|
|
test.equal(typeof meteorInstall, 'function');
|
|
var require = meteorInstall();
|
|
test.equal(typeof require, 'function');
|
|
});
|
|
|
|
Tinytest.add('modules - meteor/ - error', function (test) {
|
|
const require = meteorInstall();
|
|
test.throws(require('meteor/foo'), /Cannot find package "meteor". Try "meteor add meteor"./);
|
|
});
|
|
|
|
Tinytest.add('modules - client calling server', function (test) {
|
|
const require = meteorInstall();
|
|
test.throws(require('./../server/main.js'), 'Unable to import on the client a module from a server directory: ' + id + ' \n (cross-boundary import) see: https://guide.meteor.com/structure.html#special-directories`'
|
|
);
|
|
});
|
|
|
|
Tinytest.add('modules - server calling client', function (test) {
|
|
const require = meteorInstall();
|
|
test.throws(require('./../client/main.js'), 'Unable to import on the server a module from a client directory: ' + id + ' \n (cross-boundary import) see: https://guide.meteor.com/structure.html#special-directories`'
|
|
);
|
|
});
|