diff --git a/index.js b/index.js index 2c5d26e..7d69667 100644 --- a/index.js +++ b/index.js @@ -60,7 +60,7 @@ export async function publish( if (pluginConfig?.publishPackagePath) { // Expand glob - const { glob } = await import('glob'); + const glob = (await import('glob')).glob; packagePath = await glob(pluginConfig.publishPackagePath, { cwd }); } diff --git a/test/index.test.js b/test/index.test.js index 9f0cfa4..3fc4d26 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -251,10 +251,9 @@ test('it can publish when `OVSX_PAT` is present but `VSCE_PAT` is missing', asyn ]); }); -// TODO: Fix glob mock -test.skip('expand globs if publishPackagePath is set', async (t) => { +test('expand globs if publishPackagePath is set', async (t) => { const { verifyVsceStub, vscePrepareStub, vscePublishStub } = t.context.stubs; - const { publish } = await esmock('../index.js', { + const { publish } = await esmock.p('../index.js', { '../lib/verify.js': { verify: verifyVsceStub, }, @@ -286,10 +285,9 @@ test.skip('expand globs if publishPackagePath is set', async (t) => { ]); }); -// TODO: Fix glob mock -test.skip('publishes an extension in a non-root folder', async (t) => { +test('publishes an extension in a non-root folder', async (t) => { const { verifyVsceStub, vscePrepareStub, vscePublishStub } = t.context.stubs; - const { publish } = await esmock('../index.js', { + const { publish } = await esmock.p('../index.js', { '../lib/verify.js': { verify: verifyVsceStub, },