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

Unit tests #524

Open
wants to merge 6 commits 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
59 changes: 31 additions & 28 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
.DS_Store
.cache/
node_modules
/dist


# local env files
.env
.env.local
.env.*.local

# lock files
/yarn.lock

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.DS_Store
.cache/
node_modules
/dist


# local env files
.env
.env.local
.env.*.local

# lock files
/yarn.lock

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Unit test coverage artifacts
/coverage
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ Then switch into the newly created folder and install all dependencies:
npm install
```

Ensure that the unit tests are working correctly:

```bash
npm test
```
STAC Browser uses [Jest](https://jestjs.io/) to perform unit tests. Any code you add should have unit tests associated with it an should not break any existing tests.

By default, STAC Browser will let you browse all catalogs on STAC Index.

To browse only your own static STAC catalog or STAC API, set the `catalogUrl` CLI parameter when running the dev server.
Expand Down Expand Up @@ -270,9 +277,10 @@ STAC Browser uses [Vue](https://vuejs.org/) and [vue-cli](https://cli.vuejs.org/

You can run the following commands (see also "[Get started](#get-started)" above):

- `npm run install`: Install the dependencies, this is required once at the beginning.
- `npm install`: Install the dependencies, this is required once at the beginning.
- `npm start`: Start the development server
- `npm run lint`: Lint the source code files
- `npm test`: ensure that you have not broken any tests
- `npm run build`: Compile the source code into deployable files for the web. The resulting files can be found in the folder `dist` and you can then deploy STAC Browser on a web host. There are two other variants:
- `npm run build:report`: Same as above, but also generates a bundle size report (see `dist/report.html`), which should not be deployed.
- `npm run build:minimal`: Same as above, but tries to generate a minimal version without bundle size report and without source maps.
Expand Down
Loading