Skip to content

Commit

Permalink
Merge pull request #39 from marp-team/remove-ts-ignore
Browse files Browse the repository at this point in the history
Remove ts-ignore magic comments from test
  • Loading branch information
yhatt committed Nov 21, 2018
2 parents 7131ac3 + a05ca5f commit f182719
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
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

0 comments on commit f182719

Please sign in to comment.