testing - GeoSmartCity-CIP/gsc-client GitHub Wiki
Unit Testing
For unit testing we use tool jasmin.
Create test file
These test files are located in test
directory. So if your feature is called datagrid.js
you will create test file in this location: test/datagrid/datagrid.test.js
'use strict';
describe("Testing gsc", function () {
it("Contains version", function () {
expect(gsc.version !== undefined).toBe(true);
});
it("Has datacatalog URL", function() {
expect(gsc.dcUrl() !== '').toBe(true);
});
});
Run tests
For run the tests simply type this command:
grunt jasmine
or npm test