Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit 3c42686

Browse files
author
Cole J Calamos
committed
Added test commands
1 parent b96964d commit 3c42686

File tree

7 files changed

+1924
-119
lines changed

7 files changed

+1924
-119
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ package-lock.json
44
node_modules
55
!index.d.ts
66
*.log
7+
!jest.config.js

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ decls
3434
examples
3535
*.ts
3636
.github
37+
!jest.config.js

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [1.3.0] - 2020-06-23
9+
10+
Initial Jest Setup
11+
12+
### Added
13+
14+
- Added jest config files
15+
- Added test script
16+
817
## [1.2.0 - 1.2.3] - 2020-06-23
918

1019
Updated workflows to publish to GitHub Packages Repo.

jest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
preset: "ts-jest",
3+
testEnvironment: "node",
4+
};

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@ccalamos/gatsby-source-googlemaps-static",
33
"description": "Gatsby source plugin for Google Maps Static API",
4-
"version": "1.2.3",
4+
"version": "1.3.0",
55
"author": "Cole Calamos <cole@colejcalamos.com>",
66
"bugs": {
77
"url": "https://github.com/ccalamos/gatsby-source-googlemaps-static/issues"
@@ -23,13 +23,14 @@
2323
"license": "MIT",
2424
"devDependencies": {
2525
"@babel/cli": "^7.0.0",
26-
"@babel/core": "^7.0.1",
26+
"@babel/core": "^7.10.3",
2727
"@babel/node": "^7.0.0-beta.54",
2828
"@babel/plugin-proposal-class-properties": "^7.8.3",
2929
"@babel/plugin-proposal-object-rest-spread": "^7.8.3",
30-
"@babel/preset-env": "^7.9.6",
31-
"@babel/preset-typescript": "^7.8.3",
30+
"@babel/preset-env": "^7.10.3",
31+
"@babel/preset-typescript": "^7.10.1",
3232
"@types/fs-extra": "^9.0.1",
33+
"@types/jest": "^26.0.0",
3334
"@types/node": "^14.0.13",
3435
"@typescript-eslint/eslint-plugin": "^3.3.0",
3536
"@typescript-eslint/parser": "^3.3.0",
@@ -38,7 +39,9 @@
3839
"eslint": "^7.2.0",
3940
"eslint-config-prettier": "^6.11.0",
4041
"gatsby": "^2.2.0",
42+
"jest": "^26.1.0",
4143
"prettier": "^2.0.5",
44+
"ts-jest": "^26.1.1",
4245
"typescript": "^3.9.5"
4346
},
4447
"dependencies": {
@@ -53,6 +56,7 @@
5356
"format": "prettier --write \"{,!(node_modules)/**/}*.ts\"",
5457
"clean": "rm *.js",
5558
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
59+
"test": "jest",
5660
"typecheck": "tsc --skipLibCheck --noEmit",
5761
"prepublishOnly": "cross-env NODE_ENV=production yarn run clean; cross-env NODE_ENV=production yarn run build"
5862
},

src/__tests__/static-map.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const { isMainThread } = require("worker_threads");
2+
3+
it("Jest is setup correctly", () => {
4+
expect(true).toEqual(true);
5+
});

0 commit comments

Comments
 (0)