Skip to content

Commit

Permalink
fix: ts-expect-error
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Sketon committed Apr 29, 2024
1 parent 818fef8 commit f816096
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/scripts/hexo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('hexo', () => {
}
}
})(async () => {
// @ts-ignore
// @ts-expect-error
await hexo(cwd, {_: []});
spy.calledOnce.should.be.true;
});
Expand All @@ -35,7 +35,7 @@ describe('hexo', () => {
}
}
})(async () => {
// @ts-ignore
// @ts-expect-error
await hexo(cwd, {_: ['test']});
spy.calledOnce.should.be.true;
});
Expand All @@ -51,7 +51,7 @@ describe('hexo', () => {
}
}
})(async () => {
// @ts-ignore
// @ts-expect-error
await hexo(cwd, {_: ['test']});
spy.calledOnce.should.be.true;
});
Expand All @@ -69,7 +69,7 @@ describe('hexo', () => {
}
})(async () => {
process.argv = ['hexo', 'new', '--path', '123', 'test'];
// @ts-ignore
// @ts-expect-error
hexo(null, null);
args.path.should.eql('123');
process.argv = [];
Expand All @@ -88,7 +88,7 @@ describe('hexo', () => {
}
})(async () => {
process.argv = ['hexo', 'new', '-p', '123', 'test'];
// @ts-ignore
// @ts-expect-error
hexo(null, null);
args.p.should.eql('123');
process.argv = [];
Expand All @@ -107,7 +107,7 @@ describe('hexo', () => {
}
})(async () => {
process.argv = ['hexo', 'new', '--slug', '123', 'test'];
// @ts-ignore
// @ts-expect-error
hexo(null, null);
args.slug.should.eql('123');
process.argv = [];
Expand All @@ -126,7 +126,7 @@ describe('hexo', () => {
}
})(async () => {
process.argv = ['hexo', 'new', '-s', '123', 'test'];
// @ts-ignore
// @ts-expect-error
hexo(null, null);
args.s.should.eql('123');
process.argv = [];
Expand Down Expand Up @@ -156,7 +156,7 @@ describe('hexo', () => {
}
}
})(async () => {
// @ts-ignore
// @ts-expect-error
await hexo(cwd, {_: ['test']});
spy.args[0][0].should.eql(dummyError);
spy.args[1][0].should.eql('Local hexo loading failed in %s');
Expand Down Expand Up @@ -194,7 +194,7 @@ describe('hexo', () => {
}
}
})(async () => {
// @ts-ignore
// @ts-expect-error
await hexo(cwd, {_: ['test']});
spy.args[0][0].message.should.eql(dummyError);
process.exitCode?.should.eql(2);
Expand Down Expand Up @@ -252,7 +252,7 @@ describe('hexo', () => {
}
}
})(async () => {
// @ts-ignore
// @ts-expect-error
await hexo(cwd, {_: ['help']});
[
'Good bye',
Expand Down

0 comments on commit f816096

Please sign in to comment.