Skip to content

A scalable platform and CMS to build Node.js applications

License

Notifications You must be signed in to change notification settings

quangtynu/keystone-1

Repository files navigation

keystone-5

CircleCI

This is a prototype architecture for Keystone 5.

Everything is WIP.

Demo

Check out the demo: keystone-next.herokuapp.com

It is updated automatically when commits are merged into master.

You can reset the database by hitting the /reset-db page.

Getting Started

Keystone 5 is set up as a monorepo, using Bolt

First make sure you've got Bolt installed:

yarn global add bolt

Also make sure you have a local MongoDB server running (instructions).

If you don't have it installed, on MacOS use Homebrew (run these once):

brew install mongodb
brew services start mongodb

Then install the dependencies and start the test project:

bolt
bolt start

Contributing

All source code should be formatted with Prettier.

Code is not automatically formatted in commit hooks to avoid unexpected behaviour, so we recommended using an editor plugin to format your code as you work.

You can also run bolt format to prettier all the things.

The lint script will validate source code with both eslint and prettier.

Testing

Keystone uses Jest for unit tests and Cypress for end to end tests. All tests can be run locally and on CircleCI

Unit tests

To run the unit tests, run the script

bolt jest

Unit tests for each package can be found in packages/<package>/tests and following the naming pattern <module>.test.js.

To see test coverage of the files touched by the unit tests, run

bolt jest --coverage

To see test coverage of the entire mono-repo, including files which have zero test coverage, use the special script

bolt coverage

End to end tests

Keystone tests end to end functionality with the help of Cypress. To run these tests, you first need to start the test-project application by running

bolt start

The tests can then be run with

bolt cypress:run

Cypress can be run in interactive mode with its built in GUI, which is useful when developing and debugging tests.

bolt cypress:open

End to end tests live in cypress/integration/*spec.js.

License

Copyright (c) 2018 Jed Watson. Licensed under the MIT License.

About

A scalable platform and CMS to build Node.js applications

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.0%
  • Other 1.0%