We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9267ec7 commit 1dd520dCopy full SHA for 1dd520d
test/lib/publish.js
@@ -732,5 +732,33 @@ t.test('private workspaces', (t) => {
732
})
733
734
735
+ t.test('unexpected error', t => {
736
+ const Publish = t.mock('../../lib/publish.js', {
737
+ ...mocks,
738
+ libnpmpublish: {
739
+ publish: (manifest, tarballData, opts) => {
740
+ if (manifest.private)
741
+ throw new Error('ERR')
742
+
743
+ publishes.push(manifest)
744
+ },
745
746
+ npmlog: {
747
+ notice () {},
748
+ verbose () {},
749
750
+ })
751
+ const publish = new Publish(npm)
752
753
+ publish.execWorkspaces([], [], (err) => {
754
+ t.match(
755
+ err,
756
+ /ERR/,
757
+ 'should throw unexpected error'
758
+ )
759
+ t.end()
760
761
762
763
t.end()
764
0 commit comments