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

refactor: define clear type for compiler option in ts-jest config #3087

Merged
merged 1 commit into from Nov 22, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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}`)
})