Files
dolt/samples/js
Erik Arvidsson fb4c8624a0 JS integration tests for samples/js/{counter,fs} (#1951)
This adds some a basic integration tests for sample/js/{counter,fs}.

It work pretty much like this:

- Run `npm install`
- Do setup (good place to initialize the database) (optional).
- Start a http store from go.
- Run `node . <args...>`. The IntegrationTestSuite has convenience
  methods to get the spec.
- Do teardown, which is a good time to check the output and the current state of the db (optional).

Towards #1888
2016-07-07 14:00:32 -07:00
..
2016-07-05 16:25:21 -07:00
2016-07-05 16:25:21 -07:00
2016-07-05 16:25:21 -07:00
2016-07-06 14:20:05 -07:00

JS Samples

This directory has a package.json and a node_modules directory. This is so that we do not have to do the slow npm install in every sample. Instead each sample have no dependencies and the dependencies are added to the shared parent directory. If we instead had complete standalone samples in every subdirectory it would would mean that we have to have n copies of all the node modules we depend on. This takes a long time to install and it takes up a lot of disk space.

Running a sample

First run npm install in this directory, then in the subdirectory.

cd samples/js
npm install
cd fs
npm install

Then to run the sample:

node .

You only need to do the npm install calls once. After that you can use npm run build or npm run start for dev mode.