Skip to content

Commit

Permalink
fix glob tests
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs committed Dec 27, 2024
1 parent 67388b8 commit 1a2ea05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}

Expand Down
10 changes: 4 additions & 6 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down Expand Up @@ -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,
},
Expand Down

0 comments on commit 1a2ea05

Please sign in to comment.