Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ts-ignore magic comments from test #39

Merged
merged 3 commits into from
Nov 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Fixed

- Use `Buffer.from()` instead of deprecated constructor ([#37](https://github.com/marp-team/marp-cli/pull/37))
- Remove `@ts-ignore` magic comment from test ([#39](https://github.com/marp-team/marp-cli/pull/39))

## v0.0.13 - 2018-11-10

Expand Down
3 changes: 1 addition & 2 deletions test/converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ describe('Converter', () => {
it('converts into PDF by using temporally file', async () => {
const file = new File(onePath)

// @ts-ignore to check cleanup tmpfile
const fileCleanup = jest.spyOn(File.prototype, 'cleanup')
const fileCleanup = jest.spyOn(<any>File.prototype, 'cleanup')
const fileSave = jest
.spyOn(File.prototype, 'save')
.mockImplementation()
Expand Down
3 changes: 1 addition & 2 deletions test/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ describe('Engine', () => {
})

it("loads browser script from defined in module's marpBrowser section", async () => {
// @ts-ignore: #findClassPath is mocked
const finder = <jest.Mock>ResolvedEngine.prototype.findClassPath
const finder = <jest.Mock>(<any>ResolvedEngine.prototype).findClassPath

// Core (defined marpBrowser)
finder.mockImplementation(() => require.resolve(coreModule))
Expand Down
4 changes: 2 additions & 2 deletions test/marp-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,8 @@ describe('Marp CLI', () => {
.spyOn(getStdin, 'buffer')
.mockResolvedValue(Buffer.from('# markdown'))

// @ts-ignore: reset cached stdin buffer
File.stdinBuffer = undefined
// reset cached stdin buffer
;(<any>File).stdinBuffer = undefined

expect(await marpCli()).toBe(0)
expect(cliInfo).toHaveBeenCalledWith(
Expand Down