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

Add Jest coverage threshold and update test scripts. #68

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
Expand All @@ -7,32 +8,46 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
You should update the version number in the [package.json](./package.json) according to the semantic versioning,
then run `npm install`.

## 1.6.1

- Added coverage threshold for automated tests.

## 1.6.0

- Added 3D hero banner

## 1.5.1

- Bumped to node 16, docusaurus 2.0.1, react 17.0.2

## 1.5.0

- Fetch list of repositories by topic with GitHub GraphQL API instead of hardcoded list.

## 1.4.0

- Added pagination to Repositories Page.

## 1.3.0

- Added Repositories Page.

## 1.2.3

- Added snapshot unit tests for all React components.

## 1.2.2

- Refactored and added unit tests for `build-posts-data.js`.

## 1.2.1

- Refactored and added unit tests for `build-repo-data.js`.

## 1.2.0

- Added image to Medium blog posts, parsing the `content:encoded` field of the RSS feed.

## 1.1.0

- Switched source of Medium blog posts from Pixel Point widget to RSS feed. It shows: title, link, creator, date.
18 changes: 17 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,23 @@ const config = {
"\\.[jt]sx?$": "babel-jest",
".+\\.(css|styl|less|sass|scss)$": "jest-css-modules-transform"
},
transformIgnorePatterns: ["/node_modules/(?!(@babel/runtime)/)"]
transformIgnorePatterns: ["/node_modules/(?!(@babel/runtime)/)"],

collectCoverage: true,
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80
}
},
collectCoverageFrom: [
"src/**/*.{js,jsx,ts,tsx}",
"!src/**/*.test.{js,jsx,ts,tsx}",
"!src/**/__tests__/**"
],
coverageDirectory: "./coverage"
};

module.exports = config;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"deploy": "docusaurus deploy",
"serve": "docusaurus serve",
"clear": "docusaurus clear",
"test": "jest"
"test": "jest --coverage"
},
"dependencies": {
"@apollo/client": "^3.5.8",
Expand Down