diff options
author | Benjamin Coe <ben@npmjs.com> | 2018-03-17 02:20:09 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2018-04-11 04:24:11 +0300 |
commit | d2d290bcaa85e44a4b08cc40cb4791dd4f81dfc4 (patch) | |
tree | b5a23ee9e0642c201637c4301b0f16991a89978b /test | |
parent | 857c2138dae768ea9798782baa916b1840ab13e8 (diff) |
feat: allow optional @ prefix on scope
Credit: @bcoe
Reviewed-By: @zkat
PR-URL: https://github.com/npm/npm/pull/20082
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/team.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/tap/team.js b/test/tap/team.js index b13fa86e8..38caadde5 100644 --- a/test/tap/team.js +++ b/test/tap/team.js @@ -37,6 +37,30 @@ test('team create basic', function (t) { }) }) +test('team create (allow optional @ prefix on scope)', function (t) { + var teamData = { + name: 'test', + scope_id: 1234, + created: '2015-07-23T18:07:49.959Z', + updated: '2015-07-23T18:07:49.959Z', + deleted: null + } + server.put('/-/org/myorg/team', JSON.stringify({ + name: teamData.name + })).reply(200, teamData) + common.npm([ + 'team', 'create', '@myorg:' + teamData.name, + '--registry', common.registry, + '--loglevel', 'silent' + ], {}, function (err, code, stdout, stderr) { + t.ifError(err, 'npm team') + t.equal(code, 0, 'exited OK') + t.equal(stderr, '', 'no error output') + t.same(JSON.parse(stdout), teamData) + t.end() + }) +}) + test('team destroy', function (t) { var teamData = { name: 'myteam', |