forked from yeoman/generator
-
Notifications
You must be signed in to change notification settings - Fork 0
test namespaces
Mickael Daniel edited this page Jan 16, 2013
·
1 revision
env.namespace().
var env = generators();
assert.equal(env.namespace('backbone/all/index.js'), 'backbone:all');
assert.equal(env.namespace('backbone/all/main.js'), 'backbone:all');
assert.equal(env.namespace('backbone/all'), 'backbone:all');
assert.equal(env.namespace('backbone/all.js'), 'backbone:all');
assert.equal(env.namespace('backbone.js'), 'backbone');
assert.equal(env.namespace('generator-backbone/all.js'), 'backbone:all');
assert.equal(env.namespace('generator-mocha/backbone/model/index.js'), 'mocha:backbone:model');
assert.equal(env.namespace('generator-mocha/backbone/model.js'), 'mocha:backbone:model');
assert.equal(env.namespace('node_modules/generator-mocha/backbone/model.js'), 'mocha:backbone:model');
assert.equal(env.namespace('../local/stuff'), 'local:stuff');
assert.equal(env.namespace('./local/stuff'), 'local:stuff');
assert.equal(env.namespace('././local/stuff'), 'local:stuff');
assert.equal(env.namespace('../../local/stuff'), 'local:stuff');