Webpack now polyfills Promise automatically (We cannot do this with fetch because reasons)
Adds npm run test, npm run lint, npm run py-test, npm run js-test commands
Linting and initial tests integrated into Travis, Mocha by default runs any folder named 'tests' located within a static-source folder.
Migration notes:
Run npm install -g eslint eslint-plugin-babel-register inferno mocha
Run pip install -r requirements-dev.txt
Devs should now run npm run test prior to pushing in order to satisfy Travis.
Pytest
Runs python tests from any file that matches test_*.py in the root tests folder.
Currently only capable of handling placeholders at the moment. Integrating tests into the Python half of our codebase is somewhat difficult given the need for appengine. Will solve in a future PR make a ticket for someone else to deal with.
Mocha
Example from saylua/static-source/lib/tests/test_BaseModel.js
import * as assert from "assert";
import Component from "inferno-component";
import BaseModel from "../Models/BaseModel.js";
describe('Models', function() {
describe('BaseModel', function() {
it('should initialize without error', (done) => {
let model = new BaseModel();
assert.ok(model);
done();
});
});
});
Partially satisfies #12
npm run test
,npm run lint
,npm run py-test
,npm run js-test
commandsstatic-source
folder.Migration notes:
npm install -g eslint eslint-plugin-babel-register inferno mocha
pip install -r requirements-dev.txt
npm run test
prior to pushing in order to satisfy Travis.Pytest
Runs python tests from any file that matches
test_*.py
in the roottests
folder.Currently only capable of handling placeholders at the moment. Integrating tests into the Python half of our codebase is somewhat difficult given the need for appengine. Will
solve in a future PRmake a ticket for someone else to deal with.Mocha
Example from
saylua/static-source/lib/tests/test_BaseModel.js
Output:
Mediocre amount of additional info here.