assessment-renderer-saas v0.1.1
Assessment Renderer (ePASS)
Feed Setup
To initialize your npmrc file (only do this once):
npm install -g vsts-npm-auth --registry https://registry.npmjs.com --always-auth false
cd C:\Users\[myUserName]
cd. > .npmrc
To authorize the feed (this will need to be done every time a new feed is added):
- cd to project root directory (e.g. C:\Users[myUserName]\Source\repos\AssessmentRenderer)
- run
vsts-npm-auth -config .npmrc
Project Setup
To get up and running with this application:
- Install nodeJs (version 6.9.2 or higher) get it from http://nodejs.org
- Ensure npm is installed and up to date (npm i npm -g)
- Install Aurelia CLI globally (npm i aurelia-cli -g)
- Install Gulp globally (npm i gulp -g)
- Install Express globally (npm i express -g)
- Run "npm i" from this directory to install all dependencies for the application
- Run "au run --watch" to start the server and watch for changes to files for automatic update
After the very first time the application has been run, each day after getting latest, simply run steps 6 and 7 to get going.
To run specific to an environment (valid values are dev, stage, and prod) run:
au run --env prod --watch
To build the scripts (again, for an environment) without running the server, use:
au build --env prod
To run the renderer in standalone mode, browse to http://localhost:5878 To run the renderer in a simulated frame, browse to http://localhost:5878/framed.html
DO NOT EVER check in node_modules directory or its subdirectories as these are like nuget packages and can be reinstated on a developer's machine by simply running "npm i" from this directory.
Unit Testing
Mocks: You can store mocks that will be used by multiple tests in the test/unit/mocks directory (using subdirectories to match the source path of the class the mock doubles for). See test/unit/src/controls/ for an example of overriding Aurelia's default dependency injection to inject the mock.
Create:
au generate unit-test [componentName] [subFolder]
(**Note: if you use the component generator (au generate component...) to create a component, then a unit test is automatically created)
Run:
au test
Run with watch:
au test --watch
Resources:
Overview of some core features in Aurelia testing: http://blog.aurelia.io/2016/05/03/aurelias-new-validation-and-testing-capabilities
More in-depth overview of Aurelia testing: https://github.com/aurelia/testing/blob/master/doc/article/en-US/testing-components.md
Jasmine test framework site/docs: https://jasmine.github.io/