Skip to content

Commit

Permalink
Migrate is-tty test to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
mottox2 committed Mar 10, 2020
1 parent cd0b5bc commit 2868ce0
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { isTTY } from "../is-tty"

describe(`isTTY`, () => {
let originalTTY
let originalTTY: boolean
beforeEach(() => {
jest.resetModules()

Expand All @@ -14,7 +16,6 @@ describe(`isTTY`, () => {
jest.mock(`gatsby-core-utils`, () => {
return { isCI: () => false }
})
const isTTY = require(`../is-tty`)
expect(isTTY()).toBe(true)
})

Expand All @@ -23,7 +24,6 @@ describe(`isTTY`, () => {
jest.mock(`gatsby-core-utils`, () => {
return { isCI: () => false }
})
const isTTY = require(`../is-tty`)
expect(isTTY()).toBe(false)
})

Expand All @@ -32,7 +32,6 @@ describe(`isTTY`, () => {
jest.mock(`gatsby-core-utils`, () => {
return { isCI: () => true }
})
const isTTY = require(`../is-tty`)
expect(isTTY()).toBe(false)
})

Expand All @@ -41,7 +40,6 @@ describe(`isTTY`, () => {
jest.mock(`gatsby-core-utils`, () => {
return { isCI: () => true }
})
const isTTY = require(`../is-tty`)
expect(isTTY()).toBe(false)
})
})

0 comments on commit 2868ce0

Please sign in to comment.