Skip to content

Commit

Permalink
refactor: define clear type for compiler option in ts-jest config (
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl committed Nov 22, 2021
1 parent d8f6b96 commit cc42daf
Show file tree
Hide file tree
Showing 7 changed files with 540 additions and 1 deletion.
20 changes: 20 additions & 0 deletions e2e/__tests__/custom-compiler.test.ts
@@ -0,0 +1,20 @@
import path from 'path'

import { json as runWithJson } from '../run-jest'
import { runNpmInstall } from '../utils'

const DIR_NAME = 'custom-compiler'

describe('ttypescript', () => {
const TTS_DIR_NAME = 'ttypescript'

beforeAll(() => {
runNpmInstall(path.join(__dirname, '..', DIR_NAME, TTS_DIR_NAME))
})

test(`successfully runs the tests inside ${DIR_NAME}/${TTS_DIR_NAME}`, () => {
const { json } = runWithJson(`${DIR_NAME}/${TTS_DIR_NAME}`)

expect(json.success).toBe(true)
})
})
@@ -0,0 +1,7 @@
import { getWelcomeMessage } from '@share/foo'

test('should return welcome message', () => {
const userName = 'github-user'

expect(getWelcomeMessage(userName)).toEqual(`yolo ${userName}`)
})

0 comments on commit cc42daf

Please sign in to comment.