Skip to content

Commit

Permalink
build(devDependencies): upgrade Jest to v28.1, specify peerDependency…
Browse files Browse the repository at this point in the history
… at >v24.0.0

Identified the minimum version Jest needs to work as 24.0.0. This is due to the `setupFilesAfterEnv`
in Jest's configuration settings. Specified as a peer dependency, and updated documentation.

Resolves: #30
  • Loading branch information
M-Scott-Lassiter committed Jun 2, 2022
1 parent 928c29d commit 22d1614
Show file tree
Hide file tree
Showing 4 changed files with 2,551 additions and 2,762 deletions.
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -186,6 +186,8 @@ npm run test:<type> #runs the tests only in that category
npm run watch # Runs tests in watch mode
```

This requires at least Jest v24.0.0 (specified as a peer dependency) due to the use of `setupFilesAfterEnv`.

### Documentation

API Documentation is automatically generated from [JSDoc comments](https://jsdoc.app/) within the scripts. To generate, run:
Expand Down
19 changes: 12 additions & 7 deletions README.md
Expand Up @@ -70,7 +70,6 @@ const testPoint = {
test('Object is valid GeoJSON Point Geometry', () => {
expect(testPoint).toBePointGeometry()
})

```

This library **DOES NOT** create or manipulate GeoJSON. Other tools have done that (and better), such as the venerable [Turf.js](https://github.com/Turfjs/turf).
Expand All @@ -81,6 +80,8 @@ This project complements, not competes with, those tools.

## Install as a Dependency

After installing Jest, run:

```bash
npm install --save-dev jest-geojson
# or
Expand Down Expand Up @@ -213,6 +214,10 @@ _Future_

# Advanced Configuration

## Minimum Supported Jest Version

This project requires Jest v24.0.0 or newer.

## Import the Core Engine

The [core object](https://m-scott-lassiter.github.io/jest-geojson/Core.html) contains the functions grouped by category. You can then use these functions elsewhere in your code, or even port `jest-geojson` into another testing framework. To import the functions that drive the test matchers:
Expand All @@ -225,12 +230,12 @@ const core = require('jest-geojson/core')

You can load matcher subsets if you only need a limited set. Available scipts are:

- `jest-geojson/setup/all`
- `jest-geojson/setup/boundingBoxes`
- `jest-geojson/setup/coordinates`
- `jest-geojson/setup/featureCollections`
- `jest-geojson/setup/features`
- `jest-geojson/setup/geometries`
- `jest-geojson/setup/all`
- `jest-geojson/setup/boundingBoxes`
- `jest-geojson/setup/coordinates`
- `jest-geojson/setup/featureCollections`
- `jest-geojson/setup/features`
- `jest-geojson/setup/geometries`

For example:

Expand Down

0 comments on commit 22d1614

Please sign in to comment.