-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
125 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"presets": ["es2015"], | ||
"presets": ["env"], | ||
"env": { | ||
"test": { | ||
"plugins": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,3 @@ extends: | |
|
||
env: | ||
mocha: true | ||
|
||
globals: | ||
expect: false | ||
sinon: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
/elm-stuff/ | ||
/tests/elm-stuff/ | ||
/node_modules/ | ||
/dist/ | ||
/coverage/ | ||
/npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import './polyfill/origin' | ||
import '../elm/Stylesheets' | ||
import Elm from '../elm/Main' | ||
import '../src/Stylesheets' | ||
import Elm from '../src/Main' | ||
|
||
Elm.Main.embed(document.getElementById('elm'), __CONFIG__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
import sample from '../js/sample' | ||
import sinon from 'sinon' | ||
import assert from 'assert' | ||
|
||
describe('sample', () => { | ||
it('should pass the framework setup tests', () => { // `mocha` globals are recognized by eslint | ||
'apples'.should.not.equal('oranges') // `should` assertion style works | ||
expect(2 + 2).to.equal(4) // the global "expect" is recognized by eslint | ||
expect(true && false).to.be.false() // calling `false` enabled by `dirty-chai` | ||
const spy = sinon.spy() // the global "sinon" is recognized by eslint | ||
it('should work with sinon', () => { | ||
const spy = sinon.spy() | ||
spy(5) | ||
spy.should.be.calledOnce.calledWith(5) // `called*`, etc enabled by `chai-sinon` | ||
assert.ok(spy.calledOnce) | ||
assert.ok(spy.calledWith(5)) | ||
}) | ||
|
||
describe('sum', () => { | ||
it('should add 2 numbers', () => { | ||
sample.sum(3, 5).should.equal(8) | ||
assert.strictEqual(sample.sum(3, 5), 8) | ||
}) | ||
}) | ||
|
||
describe('product', () => { | ||
it('should multiply 2 numbers', () => { | ||
sample.product(3, 5).should.equal(15) | ||
assert.strictEqual(sample.product(3, 5), 15) | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,12 +6,14 @@ | |
"start": "webpack-dev-server --hot --inline", | ||
"build": "webpack -p --bail", | ||
"test": "run-p 'test:*'", | ||
"test:elm": "elm test --warn --compiler node_modules/.bin/elm-make elm/TestRunner.elm", | ||
"pretest:elm": "cd tests && elm package install -y", | ||
"test:elm": "elm test --warn", | ||
"test:js": "cross-env NODE_ENV=test karma start --single-run", | ||
"tdd": "run-p 'tdd:*'", | ||
"tdd:elm": "nodemon --watch 'elm/' --ext elm --exec 'npm run test:elm'", | ||
"pretdd:elm": "cd tests && elm package install -y", | ||
"tdd:elm": "elm test --watch --warn", | ||
"tdd:js": "cross-env NODE_ENV=test karma start", | ||
"clean": "rm -rf dist elm-stuff/build-artifacts", | ||
"clean": "rm -rf dist elm-stuff/build-artifacts tests/elm-stuff/build-artifacts", | ||
"elm": "elm", | ||
"elm-repl": "elm repl", | ||
"elm-package": "elm package", | ||
|
@@ -20,9 +22,9 @@ | |
"elm-test": "elm test", | ||
"ncu": "ncu", | ||
"preversion": "run-s 'ncu -- --error-level 2' test", | ||
"version": "json -4 -I -f elm-package.json -e \"this.version='${npm_package_version}'\" && git add elm-package.json", | ||
"version": "json -4 -I -f elm-package.json -e \"this.version='${npm_package_version}'\" && json -4 -I -f tests/elm-package.json -e \"this.version='${npm_package_version}'\" && git add elm-package.json tests/elm-package.json", | ||
"postversion": "git push && git push origin v${npm_package_version}", | ||
"postinstall": "elm package install -y" | ||
"postinstall": "elm package install -y && cd tests && elm package install -y" | ||
}, | ||
"author": "Greg Kubisa <[email protected]>", | ||
"license": "MIT", | ||
|
@@ -31,52 +33,46 @@ | |
"node": ">= 6.0" | ||
}, | ||
"devDependencies": { | ||
"autoprefixer": "^6.6.1", | ||
"babel-core": "^6.21.0", | ||
"babel-eslint": "^7.1.1", | ||
"babel-loader": "^6.2.10", | ||
"babel-plugin-istanbul": "^4.1.1", | ||
"babel-preset-es2015": "^6.18.0", | ||
"chai": "^3.5.0", | ||
"cross-env": "^3.1.4", | ||
"css-loader": "^0.27.3", | ||
"dirty-chai": "^1.2.2", | ||
"autoprefixer": "^7.2.3", | ||
"babel-core": "^6.26.0", | ||
"babel-eslint": "^8.1.2", | ||
"babel-loader": "^7.1.2", | ||
"babel-plugin-istanbul": "^4.1.5", | ||
"babel-preset-env": "^1.6.1", | ||
"cross-env": "^5.1.3", | ||
"css-loader": "^0.28.7", | ||
"dotenv": "^4.0.0", | ||
"elm": "^0.18.0", | ||
"elm-css": "^0.6.0", | ||
"elm-css-webpack-loader": "^3.1.0", | ||
"elm-css": "^0.6.1", | ||
"elm-css-webpack-loader": "gkubisa/elm-css-webpack-loader#aaecfd7051831ace2bdc9c7ce3171f8977f755dd", | ||
"elm-hot-loader": "^0.5.4", | ||
"elm-test": "^0.18.2", | ||
"elm-webpack-loader": "^4.1.1", | ||
"eslint": "^3.13.0", | ||
"eslint-loader": "^1.6.1", | ||
"extract-text-webpack-plugin": "^2.1.0", | ||
"file-loader": "^0.10.1", | ||
"html-webpack-plugin": "^2.26.0", | ||
"json": "^9.0.4", | ||
"karma": "^1.3.0", | ||
"karma-chai": "^0.1.0", | ||
"karma-chai-sinon": "^0.1.5", | ||
"elm-test": "^0.18.12", | ||
"elm-webpack-loader": "^4.4.0", | ||
"eslint": "^4.14.0", | ||
"eslint-loader": "^1.9.0", | ||
"extract-text-webpack-plugin": "^3.0.2", | ||
"file-loader": "^1.1.6", | ||
"html-webpack-plugin": "^2.30.1", | ||
"json": "^9.0.6", | ||
"karma": "^2.0.0", | ||
"karma-coverage": "^1.1.1", | ||
"karma-dirty-chai": "^1.0.2", | ||
"karma-mocha": "^1.3.0", | ||
"karma-mocha-reporter": "^2.2.1", | ||
"karma-phantomjs-launcher": "^1.0.2", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"karma-phantomjs-launcher": "^1.0.4", | ||
"karma-sourcemap-loader": "^0.3.7", | ||
"karma-webpack": "^2.0.3", | ||
"mocha": "^3.2.0", | ||
"node-elm-compiler": "^4.2.1", | ||
"nodemon": "^1.11.0", | ||
"karma-webpack": "^2.0.9", | ||
"mocha": "^4.0.1", | ||
"node-elm-compiler": "^4.4.1", | ||
"nodemon": "^1.14.3", | ||
"noop-loader": "^1.0.0", | ||
"npm-check-updates": "^2.8.9", | ||
"npm-run-all": "^4.0.0", | ||
"phantomjs-prebuilt": "^2.1.14", | ||
"postcss-loader": "^1.2.1", | ||
"sinon": "^2.1.0", | ||
"sinon-chai": "^2.8.0", | ||
"style-loader": "^0.16.1", | ||
"url-loader": "^0.5.7", | ||
"webpack": "^2.3.2", | ||
"webpack-dev-server": "^2.4.2" | ||
"npm-check-updates": "^2.14.0", | ||
"npm-run-all": "^4.1.2", | ||
"phantomjs-prebuilt": "^2.1.16", | ||
"postcss-loader": "^2.0.9", | ||
"sinon": "^4.1.3", | ||
"style-loader": "^0.19.1", | ||
"url-loader": "^0.6.2", | ||
"webpack": "^3.10.0", | ||
"webpack-dev-server": "^2.9.7" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = ({ file, options, env }) => ({ | ||
plugins: { | ||
'autoprefixer': env == 'production' ? {} : false, | ||
'cssnano': env == 'production' ? {} : false | ||
} | ||
}) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module App.Widget.MenuTest exposing (..) | ||
|
||
import Test exposing (Test, describe, test) | ||
import Expect | ||
|
||
|
||
suite : Test | ||
suite = | ||
describe "App.Widget.Menu" | ||
[ test "placeholder" <| | ||
\_ -> | ||
Expect.equal 2 2 | ||
|
||
-- TODO add some real tests | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"version": "0.6.0", | ||
"summary": "Elm application boilerplate - test suites", | ||
"repository": "https://github.com/gkubisa/elm-app-boilerplate.git", | ||
"license": "MIT", | ||
"source-directories": [ | ||
"../src", | ||
"." | ||
], | ||
"exposed-modules": [], | ||
"dependencies": { | ||
"Fresheyeball/elm-tuple-extra": "3.0.0 <= v < 4.0.0", | ||
"eeue56/elm-html-test": "5.1.2 <= v < 6.0.0", | ||
"elm-community/elm-test": "4.0.0 <= v < 5.0.0", | ||
"elm-lang/core": "5.1.1 <= v < 6.0.0", | ||
"elm-lang/html": "2.0.0 <= v < 3.0.0", | ||
"elm-lang/navigation": "2.1.0 <= v < 3.0.0", | ||
"evancz/url-parser": "2.0.1 <= v < 3.0.0", | ||
"rtfeldman/elm-css": "11.2.0 <= v < 12.0.0", | ||
"rtfeldman/elm-css-helpers": "2.1.0 <= v < 3.0.0", | ||
"scottcorgan/elm-css-normalize": "1.1.9 <= v < 2.0.0" | ||
}, | ||
"elm-version": "0.18.0 <= v < 0.19.0" | ||
} |