PASS build/dummy.test.js
PASS source/dummy.test.ts
Test Suites: 2 passed, 2 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 2.009 s
Ran all test suites.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.cv-name { | |
color: #40739e; | |
font-family: "Tinos", serif; | |
font-size: 35px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.grid-container { | |
display: grid; | |
padding: 0 0; | |
} | |
.container-column-2 { | |
grid-template-columns: 50% 50%; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mockedResponse: AxiosResponse = { | |
data: { | |
name: "Henry", | |
}, | |
status: 200, | |
statusText: "OK", | |
headers: {}, | |
config: {}, | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from "axios"; | |
export const fetch = async () => | |
await axios.get("https://api.spacexdata.com/v4/launches/latest"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const fetch = async () => { | |
const result = ''; | |
return result; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { fetch } from "./data"; | |
it("returns name successfully", async () => { | |
const actual = await fetch(); | |
expect(actual.data.name).toBe("Turksat 5A"); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
// skipped other properties | |
modulePathIgnorePatterns: [ | |
"<rootDir>/build/" | |
] | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
// skipped other properties | |
roots: [ | |
'<rootDir>/source/' // pointing to tests directory | |
] | |
}; |
➜ jest-with-typescript git:(main) ✗ npx jest
PASS source/dummy.test.ts
✓ Dummy unit test (1 ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 0.526 s, estimated 2 s
Ran all test suites.