Skip to content

Commit edd70e3

Browse files
committed
update ignore tests
1 parent 9d7c1bd commit edd70e3

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/test/fixtures/vscodeignore/.vscodeignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55
out/
66

77
# pattern of file name
8-
*.log
8+
*.log
9+
10+
# https://github.com/microsoft/vscode-vsce/issues/588
11+
foo
12+
!foo/bar/hello.txt
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hi there

src/test/package.test.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,13 @@ describe('collect', function () {
150150
});
151151
});
152152

153-
it('should ignore content of .vscodeignore', () => {
153+
it('should ignore content of .vscodeignore', async () => {
154154
const cwd = fixture('vscodeignore');
155+
const manifest = await readManifest(cwd);
156+
const files = await collect(manifest, { cwd });
157+
const names = files.map(f => f.path).sort();
155158

156-
return readManifest(cwd)
157-
.then(manifest => collect(manifest, { cwd }))
158-
.then(files => {
159-
assert.equal(files.length, 3);
160-
});
159+
assert.deepStrictEqual(names, ['[Content_Types].xml', 'extension.vsixmanifest', 'extension/package.json']);
161160
});
162161

163162
it('should ignore devDependencies', () => {

0 commit comments

Comments
 (0)