Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ test/*

# files
_config.*

# spec files
src/**/*.spec.js
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ public/
dist/

# Private credentials/config
_config.private.js
_config.private.js

# Removing Coverage Reports folder created.
coverage
.nyc_output
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ before_script:
- yarn serve > /dev/null 2>&1 &
- while ! curl --silent http://localhost:3000 > /dev/null 2>&1; do sleep 1; done
script:
# - yarn test:coverage
- yarn lint
- yarn test
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,28 @@
"babel-plugin-external-helpers": "^6.22.0",
"babel-preset-env": "^1.6.1",
"browser-sync": "2.x",
"chai": "^4.2.0",
"cheerio": "^1.0.0-rc.2",
"clean-css": "^4.1.9",
"eslint": "4.x",
"eslint-loader": "2.x",
"esm": "^3.0.84",
"express": "^4.16.3",
"front-matter": "^2.2.0",
"fs-extra": "6.x",
"gh-pages": "^1.0.0",
"globby": "8.x",
"highlight.js": "^9.12.0",
"jsdoc": "^3.5.5",
"jsdom": "^12.2.0",
"json5": "1.x",
"less": "2.x",
"less-loader": "^4.0.5",
"lodash": "^4.17.4",
"mocha": "^5.2.0",
"moment": "^2.18.1",
"nunjucks": "^3.0.1",
"nyc": "^13.0.1",
"raw-loader": "^0.5.1",
"rollup": "0.60",
"rollup-plugin-babel": "^3.0.2",
Expand All @@ -49,6 +54,8 @@
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-uglify": "4.x",
"rollup-pluginutils": "^2.0.1",
"sinon": "^6.3.5",
"sinon-chai": "^3.2.0",
"svg-inline-loader": "^0.8.0",
"tar": "^4.4.4",
"uglify-es": "^3.2.2",
Expand All @@ -60,6 +67,7 @@
"clean": "rm -fr node_modules",
"clean:public": "bin/cleanPublic.js",
"compile": "bin/compile.js",
"test:coverage": "nyc --reporter=lcov mocha",
"pregenerate": "yarn compile",
"generate": "bin/generate.js",
"preghpages": "yarn generate",
Expand All @@ -73,6 +81,7 @@
"serve": "bin/serve.js",
"prestart": "yarn clean:public && yarn generate",
"start": "bin/start.js",
"test:unit": "mocha test/run_unit.js",
"test": "cd test; yarn test"
},
"repository": "https://github.com/rackerlabs/helix-ui.git",
Expand All @@ -81,6 +90,7 @@
"Andrew Yurisich",
"Cathy Siller",
"Evan Nabors",
"Shaleen Agarwal",
"Steven Salinas",
"Ty Taylor"
],
Expand Down
7 changes: 7 additions & 0 deletions src/helix-ui/utils/index.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const Utils = require('./index');

describe('utils', function () {
it('it should have expected exports', () => {
expect(Utils.KEYS).to.exist;
});
});
1 change: 1 addition & 0 deletions test/mocha.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--reporter dot
14 changes: 14 additions & 0 deletions test/run_unit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
require = require('esm')(module);
const jsdom = require('jsdom'); // Needed for DOM API testing
const sinon = require('sinon');
const chai = require('chai');
const sinonChai = require('sinon-chai');
const expect = chai.expect;
chai.use(sinonChai);

global.window = new jsdom.JSDOM().window; // Needed for DOM API testing
global.sinon = sinon;
global.expect = expect;

// Add Tests Here
require('../src/helix-ui/utils/index.spec');
Loading