├── .editorconfig ├── .ember-cli ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .npmignore ├── .travis.yml ├── .watchmanconfig ├── CHANGELOG.md ├── LICENSE ├── README.md ├── blueprints └── ember-cli-mocha │ ├── files │ └── tests │ │ ├── helpers │ │ ├── destroy-app.js │ │ ├── resolver.js │ │ └── start-app.js │ │ └── test-helper.js │ └── index.js ├── config ├── ember-try.js └── environment.js ├── ember-cli-build.js ├── index.js ├── package.json ├── testem.js ├── tests ├── .eslintrc.js ├── dummy │ ├── app │ │ ├── app.js │ │ ├── index.html │ │ ├── resolver.js │ │ ├── router.js │ │ ├── styles │ │ │ └── .gitkeep │ │ └── templates │ │ │ └── application.hbs │ ├── config │ │ └── environment.js │ └── public │ │ ├── crossdomain.xml │ │ └── robots.txt ├── helpers │ ├── destroy-app.js │ ├── resolver.js │ └── start-app.js ├── index.html ├── test-helper.js └── unit │ └── .gitkeep └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [*.hbs] 16 | insert_final_newline = false 17 | 18 | [*.{diff,md}] 19 | trim_trailing_whitespace = false 20 | -------------------------------------------------------------------------------- /.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Ember CLI sends analytics information by default. The data is completely 4 | anonymous, but there are times when you might want to disable this behavior. 5 | 6 | Setting `disableAnalytics` to true will prevent any data from being sent. 7 | */ 8 | "disableAnalytics": false 9 | } 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | /vendor/ 4 | 5 | # compiled output 6 | /dist/ 7 | /tmp/ 8 | 9 | # dependencies 10 | /bower_components/ 11 | /node_modules/ 12 | 13 | # misc 14 | /coverage/ 15 | !.* 16 | 17 | # ember-try 18 | /.node_modules.ember-try/ 19 | /bower.json.ember-try 20 | /package.json.ember-try 21 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parserOptions: { 4 | ecmaVersion: 2017, 5 | sourceType: 'module' 6 | }, 7 | plugins: [ 8 | 'ember' 9 | ], 10 | extends: [ 11 | 'eslint:recommended', 12 | 'plugin:ember/recommended' 13 | ], 14 | env: { 15 | browser: true 16 | }, 17 | rules: { 18 | }, 19 | overrides: [ 20 | // node files 21 | { 22 | files: [ 23 | '.eslintrc.js', 24 | '.template-lintrc.js', 25 | 'ember-cli-build.js', 26 | 'index.js', 27 | 'testem.js', 28 | 'blueprints/*/index.js', 29 | 'config/**/*.js', 30 | 'tests/dummy/config/**/*.js' 31 | ], 32 | excludedFiles: [ 33 | 'addon/**', 34 | 'addon-test-support/**', 35 | 'app/**', 36 | 'tests/dummy/app/**' 37 | ], 38 | parserOptions: { 39 | sourceType: 'script', 40 | ecmaVersion: 2015 41 | }, 42 | env: { 43 | browser: false, 44 | node: true 45 | }, 46 | plugins: ['node'], 47 | rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { 48 | // add your custom rules and overrides for node files here 49 | }) 50 | } 51 | ] 52 | }; 53 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | 7 | # dependencies 8 | /node_modules 9 | /bower_components 10 | 11 | # misc 12 | /.eslintcache 13 | /.sass-cache 14 | /connect.lock 15 | /coverage/* 16 | /libpeerconnection.log 17 | npm-debug.log* 18 | testem.log 19 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /bower_components 2 | /config/ember-try.js 3 | /dist 4 | /tests 5 | /tmp 6 | **/.gitkeep 7 | .bowerrc 8 | .editorconfig 9 | .ember-cli 10 | .gitignore 11 | .eslintrc.js 12 | .watchmanconfig 13 | .travis.yml 14 | bower.json 15 | ember-cli-build.js 16 | testem.js 17 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: node_js 3 | node_js: 4 | - "6" 5 | 6 | branches: 7 | except: 8 | - /^dependabot\/.*$/ 9 | 10 | addons: 11 | chrome: stable 12 | 13 | cache: 14 | yarn: true 15 | directories: 16 | - $HOME/.cache # includes bowers cache 17 | 18 | env: 19 | global: 20 | - DEBUG="auto-dist-tag" 21 | matrix: 22 | # we recommend new addons test the current and previous LTS 23 | # as well as latest stable release (bonus points to beta/canary) 24 | - EMBER_TRY_SCENARIO=ember-lts-2.4 25 | - EMBER_TRY_SCENARIO=ember-lts-2.8 26 | - EMBER_TRY_SCENARIO=ember-release 27 | - EMBER_TRY_SCENARIO=ember-beta 28 | - EMBER_TRY_SCENARIO=ember-canary 29 | - EMBER_TRY_SCENARIO=ember-default 30 | 31 | matrix: 32 | fast_finish: true 33 | allow_failures: 34 | - env: EMBER_TRY_SCENARIO=ember-canary 35 | 36 | before_install: 37 | - curl -o- -L https://yarnpkg.com/install.sh | bash 38 | - export PATH=$HOME/.yarn/bin:$PATH 39 | 40 | install: 41 | - yarn install --no-lockfile 42 | 43 | script: 44 | - yarn lint 45 | - yarn ember try:one $EMBER_TRY_SCENARIO test 46 | 47 | before_deploy: 48 | - yarn global add auto-dist-tag@0.1 49 | - auto-dist-tag --write 50 | 51 | deploy: 52 | provider: npm 53 | email: stefan.penner+ember-cli@gmail.com 54 | api_key: 55 | secure: iBMJGoVWQPcqRBVVzKF0Z18BU3JdBi6eu03W7rZxGZ1pmsUCMHQ3D5YzC7bktO1d3cq4EZYLYNvZpcpU5wv7DdZ73/TNDfIysDg41Le/dwB1LD1/Z2aOdwy1hNRPCzoK6ciUysjZc7KEkgUQV5Tj5d/QbneybdUP33PvER1Q39Q= 56 | skip_cleanup: true 57 | on: 58 | tags: true 59 | repo: ember-cli/ember-cli-mocha 60 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["tmp", "dist"] 3 | } 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## v0.15.0 (2018-02-03) 4 | 5 | #### :rocket: Enhancement 6 | * [#244](https://github.com/ember-cli/ember-cli-mocha/pull/244) Update `ember-mocha` to v0.13.0. ([@Turbo87](https://github.com/Turbo87)) 7 | * [#229](https://github.com/ember-cli/ember-cli-mocha/pull/229) Remove functionality and defer to `ember-mocha` API. ([@Turbo87](https://github.com/Turbo87)) 8 | * [#235](https://github.com/ember-cli/ember-cli-mocha/pull/235) Update `ember-mocha` to v0.13.0-beta.3. ([@Turbo87](https://github.com/Turbo87)) 9 | 10 | #### Committers: 1 11 | - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) 12 | 13 | 14 | ## v0.15.0-beta.1 (2017-12-22) 15 | 16 | #### :rocket: Enhancement 17 | * [#229](https://github.com/ember-cli/ember-cli-mocha/pull/229) Remove functionality and defer to `ember-mocha` API. ([@Turbo87](https://github.com/Turbo87)) 18 | * [#235](https://github.com/ember-cli/ember-cli-mocha/pull/235) Update `ember-mocha` to v0.13.0-beta.3. ([@Turbo87](https://github.com/Turbo87)) 19 | 20 | #### Committers: 1 21 | - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) 22 | 23 | 24 | ## v0.14.5 (2018-02-03) 25 | 26 | #### :bug: Bug Fix 27 | * [#239](https://github.com/ember-cli/ember-cli-mocha/pull/239) blueprints: Add `start/destroy-app` test helper files. ([@Turbo87](https://github.com/Turbo87)) 28 | * [#237](https://github.com/ember-cli/ember-cli-mocha/pull/237) Add resolver.js back to the tests/helpers. ([@mattmarcum](https://github.com/mattmarcum)) 29 | * [#212](https://github.com/ember-cli/ember-cli-mocha/pull/212) Adjust addon "name" property. ([@Turbo87](https://github.com/Turbo87)) 30 | 31 | #### :memo: Documentation 32 | * [#230](https://github.com/ember-cli/ember-cli-mocha/pull/230) Use `lerna-changelog` to generate friendly changelog. ([@Turbo87](https://github.com/Turbo87)) 33 | 34 | #### :house: Internal 35 | * [#241](https://github.com/ember-cli/ember-cli-mocha/pull/241) testem: Use headless Chrome to run tests. ([@Turbo87](https://github.com/Turbo87)) 36 | * [#238](https://github.com/ember-cli/ember-cli-mocha/pull/238) CI: Allow failures for `ember-beta`. ([@Turbo87](https://github.com/Turbo87)) 37 | 38 | #### Committers: 2 39 | - Strangelooper ([mattmarcum](https://github.com/mattmarcum)) 40 | - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) 41 | 42 | 43 | ## v0.14.4 (2017-05-27) 44 | 45 | #### :rocket: Enhancement 46 | * [#211](https://github.com/ember-cli/ember-cli-mocha/pull/211) Update "ember-mocha" and locked dependencies. ([@Turbo87](https://github.com/Turbo87)) 47 | * [#206](https://github.com/ember-cli/ember-cli-mocha/pull/206) Add "yarn.lock" file. ([@Turbo87](https://github.com/Turbo87)) 48 | 49 | #### Committers: 1 50 | - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) 51 | 52 | 53 | ## v0.14.3 (2017-05-07) 54 | 55 | #### :bug: Bug Fix 56 | * [#205](https://github.com/ember-cli/ember-cli-mocha/pull/205) Update "ember-mocha" to v0.11.1. ([@Turbo87](https://github.com/Turbo87)) 57 | 58 | #### Committers: 1 59 | - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) 60 | 61 | 62 | ## v0.14.1 (2017-05-03) 63 | 64 | #### :rocket: Enhancement 65 | * [#200](https://github.com/ember-cli/ember-cli-mocha/pull/200) CI: Use "auto-dist-tag" for deployment. ([@Turbo87](https://github.com/Turbo87)) 66 | 67 | #### :bug: Bug Fix 68 | * [#199](https://github.com/ember-cli/ember-cli-mocha/pull/199) whitelist files to publish to npm. ([@kturney](https://github.com/kturney)) 69 | 70 | #### Committers: 2 71 | - Kyle Turney ([kturney](https://github.com/kturney)) 72 | - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) 73 | 74 | 75 | ## v0.14.0 (2017-04-28) 76 | 77 | #### :boom: Breaking Change 78 | * [#191](https://github.com/ember-cli/ember-cli-mocha/pull/191) Update ember-cli-babel to the latest version 🚀. ([@greenkeeper[bot]](https://github.com/apps/greenkeeper)) 79 | 80 | #### :rocket: Enhancement 81 | * [#196](https://github.com/ember-cli/ember-cli-mocha/pull/196) Remove unused dev dependencies. ([@Turbo87](https://github.com/Turbo87)) 82 | 83 | #### Committers: 1 84 | - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) 85 | 86 | 87 | ## v0.13.3 (2017-04-22) 88 | 89 | #### :bug: Bug Fix 90 | * [#190](https://github.com/ember-cli/ember-cli-mocha/pull/190) Prevent clobbering custom `this.options.babel`. ([@rwjblue](https://github.com/rwjblue)) 91 | 92 | #### :memo: Documentation 93 | * [#177](https://github.com/ember-cli/ember-cli-mocha/pull/177) Add emberobserver.com badge. ([@simonihmig](https://github.com/simonihmig)) 94 | * [#176](https://github.com/ember-cli/ember-cli-mocha/pull/176) Add npm badge. ([@simonihmig](https://github.com/simonihmig)) 95 | * [#175](https://github.com/ember-cli/ember-cli-mocha/pull/175) Add Travis badge. ([@simonihmig](https://github.com/simonihmig)) 96 | 97 | #### Committers: 2 98 | - Robert Jackson ([rwjblue](https://github.com/rwjblue)) 99 | - Simon Ihmig ([simonihmig](https://github.com/simonihmig)) 100 | 101 | 102 | ## v0.13.2 (2017-01-29) 103 | 104 | #### :rocket: Enhancement 105 | * [#166](https://github.com/ember-cli/ember-cli-mocha/pull/166) Make compatible with ember-cli@2.12.. ([@rwjblue](https://github.com/rwjblue)) 106 | 107 | #### :house: Internal 108 | * [#163](https://github.com/ember-cli/ember-cli-mocha/pull/163) CI: Switch NPM deploy user to "ember-cli". ([@Turbo87](https://github.com/Turbo87)) 109 | 110 | #### Committers: 2 111 | - Robert Jackson ([rwjblue](https://github.com/rwjblue)) 112 | - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) 113 | 114 | 115 | ## v0.13.1 (2016-12-09) 116 | 117 | #### :rocket: Enhancement 118 | * [#158](https://github.com/ember-cli/ember-cli-mocha/pull/158) Use "ember-mocha-adapter" from "ember-mocha" NPM package. ([@Turbo87](https://github.com/Turbo87)) 119 | * [#156](https://github.com/ember-cli/ember-cli-mocha/pull/156) blueprints: Update auto-installed "ember-cli-chai" to v0.3.0. ([@Turbo87](https://github.com/Turbo87)) 120 | * [#152](https://github.com/ember-cli/ember-cli-mocha/pull/152) Replace JSHint with ESLint. ([@Turbo87](https://github.com/Turbo87)) 121 | 122 | #### :bug: Bug Fix 123 | * [#155](https://github.com/ember-cli/ember-cli-mocha/pull/155) CI: Fix path to "ember" executable. ([@Turbo87](https://github.com/Turbo87)) 124 | 125 | #### :house: Internal 126 | * [#148](https://github.com/ember-cli/ember-cli-mocha/pull/148) Update ember-mocha to the latest version 🚀. ([@greenkeeper[bot]](https://github.com/apps/greenkeeper)) 127 | 128 | #### Committers: 1 129 | - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) 130 | 131 | 132 | ## v0.12.1 (2016-11-27) 133 | 134 | #### :rocket: Enhancement 135 | * [#145](https://github.com/ember-cli/ember-cli-mocha/pull/145) CI: Publish tags to NPM. ([@Turbo87](https://github.com/Turbo87)) 136 | * [#144](https://github.com/ember-cli/ember-cli-mocha/pull/144) Add "ember-cli-chai" to project instead of making it a dependency. ([@Turbo87](https://github.com/Turbo87)) 137 | * [#143](https://github.com/ember-cli/ember-cli-mocha/pull/143) Split "chai" code into "ember-cli-chai" addon. ([@Turbo87](https://github.com/Turbo87)) 138 | 139 | #### :bug: Bug Fix 140 | * [#146](https://github.com/ember-cli/ember-cli-mocha/pull/146) Update "ember-mocha" to v0.9.4. ([@Turbo87](https://github.com/Turbo87)) 141 | 142 | #### Committers: 1 143 | - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) 144 | 145 | 146 | ## v0.12.0 (2016-11-23) 147 | 148 | #### :rocket: Enhancement 149 | * [#133](https://github.com/ember-cli/ember-cli-mocha/pull/133) Update "ember-mocha" to v0.9.x. ([@Turbo87](https://github.com/Turbo87)) 150 | 151 | #### :bug: Bug Fix 152 | * [#135](https://github.com/ember-cli/ember-cli-mocha/pull/135) Fix broken test-loader test. ([@Turbo87](https://github.com/Turbo87)) 153 | 154 | #### :house: Internal 155 | * [#139](https://github.com/ember-cli/ember-cli-mocha/pull/139) ember-cli 2.9. ([@Dhaulagiri](https://github.com/Dhaulagiri)) 156 | * [#138](https://github.com/ember-cli/ember-cli-mocha/pull/138) Remove unused dependencies. ([@Turbo87](https://github.com/Turbo87)) 157 | * [#136](https://github.com/ember-cli/ember-cli-mocha/pull/136) Cleanup package.json. ([@Turbo87](https://github.com/Turbo87)) 158 | 159 | #### Committers: 2 160 | - Brian Runnells ([Dhaulagiri](https://github.com/Dhaulagiri)) 161 | - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) 162 | 163 | 164 | ## v0.11.0 (2016-11-10) 165 | 166 | #### :boom: Breaking Change 167 | * [#123](https://github.com/ember-cli/ember-cli-mocha/pull/123) Remove blueprints. ([@Turbo87](https://github.com/Turbo87)) 168 | 169 | #### :rocket: Enhancement 170 | * [#129](https://github.com/ember-cli/ember-cli-mocha/pull/129) Replace `ember-cli-test-loader` Bower with NPM dependency. ([@alexlafroscia](https://github.com/alexlafroscia)) 171 | * [#118](https://github.com/ember-cli/ember-cli-mocha/pull/118) avoid writing jshint ignore in blueprint tests if jshint is not detected. ([@philtobias](https://github.com/philtobias)) 172 | * [#124](https://github.com/ember-cli/ember-cli-mocha/pull/124) Load Mocha and Chai from NPM. ([@Turbo87](https://github.com/Turbo87)) 173 | * [#125](https://github.com/ember-cli/ember-cli-mocha/pull/125) Improved test generator output. ([@Turbo87](https://github.com/Turbo87)) 174 | * [#107](https://github.com/ember-cli/ember-cli-mocha/pull/107) Remove JSHint lintTree. ([@Turbo87](https://github.com/Turbo87)) 175 | * [#109](https://github.com/ember-cli/ember-cli-mocha/pull/109) Use absolute path in acceptance test blueprints. ([@Dhaulagiri](https://github.com/Dhaulagiri)) 176 | * [#110](https://github.com/ember-cli/ember-cli-mocha/pull/110) Add destroy step to instance-initializer test blueprint. ([@bttf](https://github.com/bttf)) 177 | 178 | #### :memo: Documentation 179 | * [#126](https://github.com/ember-cli/ember-cli-mocha/pull/126) Add changelog file. ([@Turbo87](https://github.com/Turbo87)) 180 | 181 | #### :house: Internal 182 | * [#112](https://github.com/ember-cli/ember-cli-mocha/pull/112) Add simple tests for test-loader. ([@trentmwillis](https://github.com/trentmwillis)) 183 | 184 | #### Committers: 6 185 | - Adnan Chowdhury ([bttf](https://github.com/bttf)) 186 | - Alex LaFroscia ([alexlafroscia](https://github.com/alexlafroscia)) 187 | - Brian Runnells ([Dhaulagiri](https://github.com/Dhaulagiri)) 188 | - Phil Tobias ([philtobias](https://github.com/philtobias)) 189 | - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) 190 | - Trent Willis ([trentmwillis](https://github.com/trentmwillis)) 191 | 192 | 193 | ## v0.10.4 (2016-06-15) 194 | 195 | #### :bug: Bug Fix 196 | * [#115](https://github.com/ember-cli/ember-cli-mocha/pull/115) Add missing _super call to init(). ([@Turbo87](https://github.com/Turbo87)) 197 | 198 | #### Committers: 1 199 | - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) 200 | 201 | 202 | ## v0.10.3 (2016-06-15) 203 | 204 | #### :rocket: Enhancement 205 | * [#111](https://github.com/ember-cli/ember-cli-mocha/pull/111) Support loading test-loader from NPM. ([@trentmwillis](https://github.com/trentmwillis)) 206 | * [#108](https://github.com/ember-cli/ember-cli-mocha/pull/108) Add instance initializer blueprint.. ([@blimmer](https://github.com/blimmer)) 207 | 208 | #### Committers: 2 209 | - Ben Limmer ([blimmer](https://github.com/blimmer)) 210 | - Trent Willis ([trentmwillis](https://github.com/trentmwillis)) 211 | 212 | 213 | ## v0.10.2 (2016-04-14) 214 | 215 | #### :rocket: Enhancement 216 | * [#106](https://github.com/ember-cli/ember-cli-mocha/pull/106) TestGenerator: Remove "expected false to be truthy" message. ([@Turbo87](https://github.com/Turbo87)) 217 | 218 | #### Committers: 1 219 | - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) 220 | 221 | 222 | ## v0.10.1 (2016-03-05) 223 | 224 | #### :rocket: Enhancement 225 | * [#102](https://github.com/ember-cli/ember-cli-mocha/pull/102) Implement test file generator function. ([@Turbo87](https://github.com/Turbo87)) 226 | * [#99](https://github.com/ember-cli/ember-cli-mocha/pull/99) Remove "ember-mocha" bower dependency. ([@Turbo87](https://github.com/Turbo87)) 227 | 228 | #### :bug: Bug Fix 229 | * [#101](https://github.com/ember-cli/ember-cli-mocha/pull/101) blueprints: Fix typo in afterInstall() method. ([@Turbo87](https://github.com/Turbo87)) 230 | 231 | #### :memo: Documentation 232 | * [#104](https://github.com/ember-cli/ember-cli-mocha/pull/104) Update README.md. ([@jasonmit](https://github.com/jasonmit)) 233 | 234 | #### Committers: 3 235 | - Benjamin Rosas ([ballPointPenguin](https://github.com/ballPointPenguin)) 236 | - Jason Mitchell ([jasonmit](https://github.com/jasonmit)) 237 | - Tobias Bieniek ([Turbo87](https://github.com/Turbo87)) 238 | 239 | 240 | ## v0.10.0 (2016-02-01) 241 | 242 | #### :rocket: Enhancement 243 | * [#96](https://github.com/ember-cli/ember-cli-mocha/pull/96) Update to pull ember-mocha from NPM.. ([@rwjblue](https://github.com/rwjblue)) 244 | 245 | #### Committers: 1 246 | - Robert Jackson ([rwjblue](https://github.com/rwjblue)) 247 | 248 | 249 | ## v0.9.8 (2015-12-11) 250 | 251 | #### :rocket: Enhancement 252 | * [#91](https://github.com/ember-cli/ember-cli-mocha/pull/91) Update test blueprints to use let. ([@Dhaulagiri](https://github.com/Dhaulagiri)) 253 | 254 | #### Committers: 1 255 | - Brian Runnells ([Dhaulagiri](https://github.com/Dhaulagiri)) 256 | 257 | 258 | ## v0.9.7 (2015-11-10) 259 | 260 | #### :rocket: Enhancement 261 | * [#89](https://github.com/ember-cli/ember-cli-mocha/pull/89) Protect against NPE in linting config.. ([@blimmer](https://github.com/blimmer)) 262 | 263 | #### Committers: 1 264 | - Ben Limmer ([blimmer](https://github.com/blimmer)) 265 | 266 | 267 | ## v0.9.6 (2015-11-10) 268 | 269 | #### :rocket: Enhancement 270 | * [#87](https://github.com/ember-cli/ember-cli-mocha/pull/87) Allow turning off linting. ([@martndemus](https://github.com/martndemus)) 271 | 272 | #### Committers: 1 273 | - Marten ([martndemus](https://github.com/martndemus)) 274 | 275 | 276 | ## v0.9.5 (2015-11-09) 277 | 278 | #### :rocket: Enhancement 279 | * [#82](https://github.com/ember-cli/ember-cli-mocha/pull/82) Utilize new destroy-app.js when present.. ([@blimmer](https://github.com/blimmer)) 280 | 281 | #### Committers: 1 282 | - Ben Limmer ([blimmer](https://github.com/blimmer)) 283 | 284 | 285 | ## v0.9.4 (2015-11-08) 286 | 287 | #### :rocket: Enhancement 288 | * [#86](https://github.com/ember-cli/ember-cli-mocha/pull/86) Upgrade broccoli-jshint to take advantage of broccoli-persistent-filter. ([@johnnyshields](https://github.com/johnnyshields)) 289 | * [#84](https://github.com/ember-cli/ember-cli-mocha/pull/84) Add support for query option in test command. ([@trentmwillis](https://github.com/trentmwillis)) 290 | 291 | #### Committers: 2 292 | - Johnny Shields ([johnnyshields](https://github.com/johnnyshields)) 293 | - Trent Willis ([trentmwillis](https://github.com/trentmwillis)) 294 | 295 | 296 | ## v0.9.3 (2015-09-10) 297 | 298 | #### :rocket: Enhancement 299 | * [#79](https://github.com/ember-cli/ember-cli-mocha/pull/79) Utilize lodash blueprint vs. string building.. ([@blimmer](https://github.com/blimmer)) 300 | * [#75](https://github.com/ember-cli/ember-cli-mocha/pull/75) Remove trailing whitespace from blueprint. ([@HeroicEric](https://github.com/HeroicEric)) 301 | 302 | #### Committers: 2 303 | - Ben Limmer ([blimmer](https://github.com/blimmer)) 304 | - Eric Kelly ([HeroicEric](https://github.com/HeroicEric)) 305 | 306 | 307 | ## v0.9.2 (2015-08-05) 308 | 309 | #### :bug: Bug Fix 310 | * [#69](https://github.com/ember-cli/ember-cli-mocha/pull/69) Fix bower install. ([@blimmer](https://github.com/blimmer)) 311 | 312 | #### Committers: 1 313 | - Ben Limmer ([blimmer](https://github.com/blimmer)) 314 | 315 | 316 | ## v0.9.1 (2015-07-13) 317 | 318 | #### :bug: Bug Fix 319 | * [#65](https://github.com/ember-cli/ember-cli-mocha/pull/65) Fix compatibility with Ember CLI 0.2.7. ([@blimmer](https://github.com/blimmer)) 320 | 321 | #### Committers: 1 322 | - Ben Limmer ([blimmer](https://github.com/blimmer)) 323 | 324 | 325 | ## v0.9.0 (2015-07-09) 326 | 327 | #### :rocket: Enhancement 328 | * [#64](https://github.com/ember-cli/ember-cli-mocha/pull/64) Generate a component integration test by default.. ([@blimmer](https://github.com/blimmer)) 329 | 330 | #### Committers: 1 331 | - Ben Limmer ([blimmer](https://github.com/blimmer)) 332 | 333 | 334 | ## v0.8.0 (2015-06-19) 335 | 336 | #### :rocket: Enhancement 337 | * [#57](https://github.com/ember-cli/ember-cli-mocha/pull/57) Allow generation of a component integration test.. ([@blimmer](https://github.com/blimmer)) 338 | * [#49](https://github.com/ember-cli/ember-cli-mocha/pull/49) Use Ember.Application's container in initializers blueprint. ([@VasylMarchuk](https://github.com/VasylMarchuk)) 339 | * [#50](https://github.com/ember-cli/ember-cli-mocha/pull/50) Rename App to application and move it inside describe. ([@VasylMarchuk](https://github.com/VasylMarchuk)) 340 | * [#54](https://github.com/ember-cli/ember-cli-mocha/pull/54) Expose the mocha runner. ([@johanneswuerbach](https://github.com/johanneswuerbach)) 341 | * [#47](https://github.com/ember-cli/ember-cli-mocha/pull/47) Closes [#46](https://github.com/ember-cli/ember-cli-mocha/issues/46) - Warns on usage of Qunit which clashes with Mocha tests.. ([@jonathanKingston](https://github.com/jonathanKingston)) 342 | * [#55](https://github.com/ember-cli/ember-cli-mocha/pull/55) Loosen broccoli-jshint dependency. ([@ef4](https://github.com/ef4)) 343 | 344 | #### :bug: Bug Fix 345 | * [#56](https://github.com/ember-cli/ember-cli-mocha/pull/56) Suppress NPM license warning.. ([@blimmer](https://github.com/blimmer)) 346 | 347 | #### Committers: 5 348 | - Ben Limmer ([blimmer](https://github.com/blimmer)) 349 | - Edward Faulkner ([ef4](https://github.com/ef4)) 350 | - Johannes Würbach ([johanneswuerbach](https://github.com/johanneswuerbach)) 351 | - Jonathan Kingston ([jonathanKingston](https://github.com/jonathanKingston)) 352 | - Vasyl Marchuk ([VasylMarchuk](https://github.com/VasylMarchuk)) 353 | 354 | 355 | ## v0.6.1 (2015-05-13) 356 | 357 | #### :rocket: Enhancement 358 | * [#48](https://github.com/ember-cli/ember-cli-mocha/pull/48) TestCommand.availableOptions invert support. ([@blimmer](https://github.com/blimmer)) 359 | 360 | #### Committers: 1 361 | - Ben Limmer ([blimmer](https://github.com/blimmer)) 362 | 363 | 364 | ## v0.6.0 (2015-04-04) 365 | 366 | #### :bug: Bug Fix 367 | * [#43](https://github.com/ember-cli/ember-cli-mocha/pull/43) Fix testing root element styles not working. ([@Soliah](https://github.com/Soliah)) 368 | 369 | #### Committers: 1 370 | - Christopher Chow ([Soliah](https://github.com/Soliah)) 371 | 372 | 373 | ## v0.5.0 (2015-02-22) 374 | 375 | #### :rocket: Enhancement 376 | * [#42](https://github.com/ember-cli/ember-cli-mocha/pull/42) Use mocha + chai shims. ([@dgeb](https://github.com/dgeb)) 377 | 378 | #### Committers: 1 379 | - Dan Gebhardt ([dgeb](https://github.com/dgeb)) 380 | 381 | 382 | ## v0.4.2 (2015-02-16) 383 | 384 | #### :bug: Bug Fix 385 | * [#36](https://github.com/ember-cli/ember-cli-mocha/pull/36) Removed lint-friendly assertion from jshint test generator. ([@slindberg](https://github.com/slindberg)) 386 | 387 | #### Committers: 1 388 | - Steven Lindberg ([slindberg](https://github.com/slindberg)) 389 | 390 | 391 | ## v0.4.1 (2015-02-16) 392 | 393 | #### :rocket: Enhancement 394 | * [#40](https://github.com/ember-cli/ember-cli-mocha/pull/40) Support ember-cli-test-loader to check for test inclusion issues, fixes .... ([@jonathanKingston](https://github.com/jonathanKingston)) 395 | 396 | #### Committers: 1 397 | - Jonathan Kingston ([jonathanKingston](https://github.com/jonathanKingston)) 398 | 399 | 400 | ## v0.4.0 (2015-02-01) 401 | 402 | #### :bug: Bug Fix 403 | * [#33](https://github.com/ember-cli/ember-cli-mocha/pull/33) Restore ability to filter tests on command line. ([@backspace](https://github.com/backspace)) 404 | 405 | #### Committers: 1 406 | - Buck Doyle ([backspace](https://github.com/backspace)) 407 | 408 | 409 | ## v0.3.1 (2015-01-28) 410 | 411 | #### :rocket: Enhancement 412 | * [#29](https://github.com/ember-cli/ember-cli-mocha/pull/29) Updates to match ember-cli-qunit 0.2.0 and 0.3.0 changes.. ([@rwjblue](https://github.com/rwjblue)) 413 | * [#28](https://github.com/ember-cli/ember-cli-mocha/pull/28) Incorporate pod support for test blueprints. ([@DanielOchoa](https://github.com/DanielOchoa)) 414 | * [#26](https://github.com/ember-cli/ember-cli-mocha/pull/26) Add jshinting support. ([@ef4](https://github.com/ef4)) 415 | 416 | #### :bug: Bug Fix 417 | * [#30](https://github.com/ember-cli/ember-cli-mocha/pull/30) Use .jshintrc for the type being linted.. ([@rwjblue](https://github.com/rwjblue)) 418 | 419 | #### Committers: 3 420 | - Daniel Ochoa ([DanielOchoa](https://github.com/DanielOchoa)) 421 | - Edward Faulkner ([ef4](https://github.com/ef4)) 422 | - Robert Jackson ([rwjblue](https://github.com/rwjblue)) 423 | 424 | 425 | ## v0.3.0 (2015-01-25) 426 | 427 | #### :rocket: Enhancement 428 | * [#24](https://github.com/ember-cli/ember-cli-mocha/pull/24) Update to latest ember-cli-test-loader.. ([@rwjblue](https://github.com/rwjblue)) 429 | 430 | #### :bug: Bug Fix 431 | * [#19](https://github.com/ember-cli/ember-cli-mocha/pull/19) Check before outputting needs in model-test. ([@backspace](https://github.com/backspace)) 432 | 433 | #### Committers: 2 434 | - Buck Doyle ([backspace](https://github.com/backspace)) 435 | - Robert Jackson ([rwjblue](https://github.com/rwjblue)) 436 | 437 | 438 | ## v0.2.1 (2014-12-22) 439 | 440 | #### :rocket: Enhancement 441 | * [#18](https://github.com/ember-cli/ember-cli-mocha/pull/18) Allow `ember test --filter` to perform mocha `grep`.. ([@rwjblue](https://github.com/rwjblue)) 442 | 443 | #### Committers: 1 444 | - Robert Jackson ([rwjblue](https://github.com/rwjblue)) 445 | 446 | 447 | ## v0.2.0 (2014-12-06) 448 | 449 | #### :rocket: Enhancement 450 | * [#13](https://github.com/ember-cli/ember-cli-mocha/pull/13) Follow-up switchfly/ember-cli-mocha#9. ([@skyuplam](https://github.com/skyuplam)) 451 | 452 | #### :memo: Documentation 453 | * [#11](https://github.com/ember-cli/ember-cli-mocha/pull/11) Describe resolution of mocha/chai conflicts. ([@clekstro](https://github.com/clekstro)) 454 | 455 | #### Committers: 2 456 | - Curtis Ekstrom ([clekstro](https://github.com/clekstro)) 457 | - Terrence Lam ([skyuplam](https://github.com/skyuplam)) 458 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ember-cli-mocha 2 | 3 | **NOTE: This addon has been deprecated! Please use ember-mocha directly instead.** 4 | 5 | ## Migrating to `ember-mocha` 6 | 7 | To upgrade from `ember-cli-mocha` to `ember-mocha` perform the following: 8 | 9 | ### `yarn` 10 | 11 | * `yarn remove ember-cli-mocha` 12 | * `yarn add -D ember-mocha` 13 | * Update `tests/test-helper.js` to replace any imports from `ember-cli-mocha` with an import from `ember-mocha`. 14 | 15 | ### `npm` 16 | 17 | * `npm uninstall --save-dev ember-cli-mocha` 18 | * `npm install --save-dev ember-mocha` 19 | * Update `tests/test-helper.js` to replace any imports from `ember-cli-mocha` with an import from `ember-mocha`. 20 | -------------------------------------------------------------------------------- /blueprints/ember-cli-mocha/files/tests/helpers/destroy-app.js: -------------------------------------------------------------------------------- 1 | import { run } from '@ember/runloop'; 2 | 3 | export default function destroyApp(application) { 4 | run(application, 'destroy'); 5 | } 6 | -------------------------------------------------------------------------------- /blueprints/ember-cli-mocha/files/tests/helpers/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from '../../resolver'; 2 | import config from '../../config/environment'; 3 | 4 | const resolver = Resolver.create(); 5 | 6 | resolver.namespace = { 7 | modulePrefix: config.modulePrefix, 8 | podModulePrefix: config.podModulePrefix 9 | }; 10 | 11 | export default resolver; 12 | -------------------------------------------------------------------------------- /blueprints/ember-cli-mocha/files/tests/helpers/start-app.js: -------------------------------------------------------------------------------- 1 | import Application from '../../app'; 2 | import config from '../../config/environment'; 3 | import { merge } from '@ember/polyfills'; 4 | import { run } from '@ember/runloop'; 5 | 6 | export default function startApp(attrs) { 7 | let attributes = merge({}, config.APP); 8 | attributes.autoboot = true; 9 | attributes = merge(attributes, attrs); // use defaults, but you can override; 10 | 11 | return run(() => { 12 | let application = Application.create(attributes); 13 | application.setupForTesting(); 14 | application.injectTestHelpers(); 15 | return application; 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /blueprints/ember-cli-mocha/files/tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import resolver from './helpers/resolver'; 2 | import { setResolver } from 'ember-mocha'; 3 | 4 | setResolver(resolver); 5 | -------------------------------------------------------------------------------- /blueprints/ember-cli-mocha/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'ember-cli-mocha', 3 | 4 | normalizeEntityName: function() { 5 | // this prevents an error when the entityName is 6 | // not specified (since that doesn't actually matter 7 | // to us 8 | }, 9 | 10 | afterInstall: function() { 11 | var addonContext = this; 12 | 13 | return addonContext.addPackageToProject('ember-cli-chai', '^0.4.0').then(function() { 14 | if ('removePackageFromProject' in addonContext) { 15 | return addonContext.removePackageFromProject('ember-cli-qunit'); 16 | } 17 | }); 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /config/ember-try.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* eslint-env node */ 4 | 5 | module.exports = { 6 | useYarn: true, 7 | scenarios: [ 8 | { 9 | name: 'ember-lts-2.4', 10 | bower: { 11 | dependencies: { 12 | 'ember': 'components/ember#lts-2-4' 13 | }, 14 | resolutions: { 15 | 'ember': 'lts-2-4' 16 | } 17 | }, 18 | npm: { 19 | devDependencies: { 20 | 'ember-source': null 21 | } 22 | } 23 | }, 24 | { 25 | name: 'ember-lts-2.8', 26 | bower: { 27 | dependencies: { 28 | 'ember': 'components/ember#lts-2-8' 29 | }, 30 | resolutions: { 31 | 'ember': 'lts-2-8' 32 | } 33 | }, 34 | npm: { 35 | devDependencies: { 36 | 'ember-source': null 37 | } 38 | } 39 | }, 40 | { 41 | name: 'ember-release', 42 | bower: { 43 | dependencies: { 44 | 'ember': 'components/ember#release' 45 | }, 46 | resolutions: { 47 | 'ember': 'release' 48 | } 49 | }, 50 | npm: { 51 | devDependencies: { 52 | 'ember-source': null 53 | } 54 | } 55 | }, 56 | { 57 | name: 'ember-beta', 58 | bower: { 59 | dependencies: { 60 | 'ember': 'components/ember#beta' 61 | }, 62 | resolutions: { 63 | 'ember': 'beta' 64 | } 65 | }, 66 | npm: { 67 | devDependencies: { 68 | 'ember-source': null 69 | } 70 | } 71 | }, 72 | { 73 | name: 'ember-canary', 74 | bower: { 75 | dependencies: { 76 | 'ember': 'components/ember#canary' 77 | }, 78 | resolutions: { 79 | 'ember': 'canary' 80 | } 81 | }, 82 | npm: { 83 | devDependencies: { 84 | 'ember-source': null 85 | } 86 | } 87 | }, 88 | { 89 | name: 'ember-default', 90 | npm: { 91 | devDependencies: {} 92 | } 93 | } 94 | ] 95 | }; 96 | -------------------------------------------------------------------------------- /config/environment.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* eslint-env node */ 4 | 5 | module.exports = function(/* environment, appConfig */) { 6 | return { }; 7 | }; 8 | -------------------------------------------------------------------------------- /ember-cli-build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* eslint-env node */ 4 | 5 | const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); 6 | 7 | module.exports = function(defaults) { 8 | var app = new EmberAddon(defaults, { 9 | eslint: { 10 | testGenerator: 'mocha', 11 | }, 12 | }); 13 | 14 | /* 15 | This build file specifies the options for the dummy test app of this 16 | addon, located in `/tests/dummy` 17 | This build file does *not* influence how the addon or the app using it 18 | behave. You most likely want to be modifying `./index.js` or app's build file 19 | */ 20 | 21 | return app.toTree(); 22 | }; 23 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* eslint-env node */ 4 | 5 | var path = require('path'); 6 | 7 | module.exports = { 8 | name: 'ember-cli-mocha', 9 | 10 | init() { 11 | this._super.init && this._super.init.apply(this, arguments); 12 | 13 | this.ui.writeDeprecateLine('ember-cli-mocha is deprecated, please migrate to depend on ember-mocha directly'); 14 | }, 15 | 16 | contentFor(type) { 17 | let output = this.eachAddonInvoke('contentFor', [type]); 18 | return output.join('\n'); 19 | }, 20 | 21 | blueprintsPath() { 22 | return path.join(__dirname, 'blueprints'); 23 | }, 24 | }; 25 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ember-cli-mocha", 3 | "version": "0.15.0", 4 | "description": "Mocha and Chai tests for ember-cli applications", 5 | "files": [ 6 | "blueprints/", 7 | "templates/", 8 | "vendor/", 9 | "index.js" 10 | ], 11 | "keywords": [ 12 | "chai", 13 | "ember", 14 | "ember-addon", 15 | "mocha" 16 | ], 17 | "homepage": "https://github.com/ember-cli/ember-cli-mocha", 18 | "bugs": { 19 | "url": "https://github.com/ember-cli/ember-cli-mocha/issues" 20 | }, 21 | "license": "Apache-2.0", 22 | "author": "Dan Gebhardt", 23 | "main": "index.js", 24 | "directories": { 25 | "doc": "doc", 26 | "test": "tests" 27 | }, 28 | "repository": { 29 | "type": "git", 30 | "url": "https://github.com/ember-cli/ember-cli-mocha.git" 31 | }, 32 | "scripts": { 33 | "build": "ember build", 34 | "changelog": "lerna-changelog", 35 | "lint": "eslint . --cache", 36 | "start": "ember server", 37 | "test": "ember try:each" 38 | }, 39 | "dependencies": { 40 | "ember-mocha": "^0.14.0" 41 | }, 42 | "devDependencies": { 43 | "ember-cli": "~2.16.0", 44 | "ember-cli-babel": "^7.7.3", 45 | "ember-cli-chai": "^0.5.0", 46 | "ember-cli-dependency-checker": "^3.0.0", 47 | "ember-cli-htmlbars": "^3.0.0", 48 | "ember-cli-htmlbars-inline-precompile": "^2.1.0", 49 | "ember-cli-inject-live-reload": "^2.0.1", 50 | "ember-disable-prototype-extensions": "^1.1.2", 51 | "ember-load-initializers": "^2.0.0", 52 | "ember-resolver": "^5.1.3", 53 | "ember-source": "~3.9.1", 54 | "eslint": "^5.16.0", 55 | "eslint-plugin-ember": "^6.4.1", 56 | "eslint-plugin-node": "^8.0.0", 57 | "lerna-changelog": "^0.8.0", 58 | "loader.js": "^4.2.3" 59 | }, 60 | "engines": { 61 | "node": "6.* || 8.* || >= 10.*" 62 | }, 63 | "changelog": { 64 | "repo": "ember-cli/ember-cli-mocha", 65 | "labels": { 66 | "breaking": ":boom: Breaking Change", 67 | "enhancement": ":rocket: Enhancement", 68 | "bug": ":bug: Bug Fix", 69 | "documentation": ":memo: Documentation", 70 | "internal": ":house: Internal" 71 | } 72 | }, 73 | "ember-addon": { 74 | "configPath": "tests/dummy/config", 75 | "main": "index.js" 76 | }, 77 | "greenkeeper": { 78 | "ignore": [ 79 | "mocha" 80 | ] 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /testem.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* eslint-env node */ 4 | 5 | module.exports = { 6 | "test_page": "tests/index.html?hidepassed", 7 | "disable_watching": true, 8 | "launch_in_ci": [ 9 | "Chrome", 10 | ], 11 | "launch_in_dev": [ 12 | "Chrome", 13 | ], 14 | "browser_args": { 15 | "Chrome": { 16 | mode: 'ci', 17 | args: [ 18 | // --no-sandbox is needed when running Chrome inside a container 19 | process.env.TRAVIS ? '--no-sandbox' : null, 20 | 21 | '--disable-gpu', 22 | '--headless', 23 | '--remote-debugging-port=0', 24 | '--window-size=1440,900', 25 | ].filter(Boolean), 26 | }, 27 | }, 28 | }; 29 | -------------------------------------------------------------------------------- /tests/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | 'embertest': true 4 | } 5 | }; 6 | -------------------------------------------------------------------------------- /tests/dummy/app/app.js: -------------------------------------------------------------------------------- 1 | import Application from '@ember/application'; 2 | import Resolver from './resolver'; 3 | import loadInitializers from 'ember-load-initializers'; 4 | import config from './config/environment'; 5 | 6 | let App = Application.extend({ 7 | modulePrefix: config.modulePrefix, 8 | podModulePrefix: config.podModulePrefix, 9 | Resolver 10 | }); 11 | 12 | loadInitializers(App, config.modulePrefix); 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /tests/dummy/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dummy 7 | 8 | 9 | 10 | {{content-for "head"}} 11 | 12 | 13 | 14 | 15 | {{content-for "head-footer"}} 16 | 17 | 18 | {{content-for "body"}} 19 | 20 | 21 | 22 | 23 | {{content-for "body-footer"}} 24 | 25 | 26 | -------------------------------------------------------------------------------- /tests/dummy/app/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from 'ember-resolver'; 2 | 3 | export default Resolver; 4 | -------------------------------------------------------------------------------- /tests/dummy/app/router.js: -------------------------------------------------------------------------------- 1 | import EmberRouter from '@ember/routing/router'; 2 | import config from './config/environment'; 3 | 4 | const Router = EmberRouter.extend({ 5 | location: config.locationType, 6 | rootURL: config.rootURL 7 | }); 8 | 9 | Router.map(function() { 10 | }); 11 | 12 | export default Router; 13 | -------------------------------------------------------------------------------- /tests/dummy/app/styles/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ember-cli/ember-cli-mocha/bdb5d8d5ac50ecb8d38101caff3e63a6040cc6be/tests/dummy/app/styles/.gitkeep -------------------------------------------------------------------------------- /tests/dummy/app/templates/application.hbs: -------------------------------------------------------------------------------- 1 |

Welcome to Ember

2 | 3 | {{outlet}} 4 | -------------------------------------------------------------------------------- /tests/dummy/config/environment.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* eslint-env node */ 4 | 5 | module.exports = function(environment) { 6 | var ENV = { 7 | modulePrefix: 'dummy', 8 | environment: environment, 9 | rootURL: '/', 10 | locationType: 'auto', 11 | EmberENV: { 12 | FEATURES: { 13 | // Here you can enable experimental features on an ember canary build 14 | // e.g. 'with-controller': true 15 | }, 16 | EXTEND_PROTOTYPES: { 17 | // Prevent Ember Data from overriding Date.parse. 18 | Date: false 19 | } 20 | }, 21 | 22 | APP: { 23 | // Here you can pass flags/options to your application instance 24 | // when it is created 25 | } 26 | }; 27 | 28 | if (environment === 'development') { 29 | // ENV.APP.LOG_RESOLVER = true; 30 | // ENV.APP.LOG_ACTIVE_GENERATION = true; 31 | // ENV.APP.LOG_TRANSITIONS = true; 32 | // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; 33 | // ENV.APP.LOG_VIEW_LOOKUPS = true; 34 | } 35 | 36 | if (environment === 'test') { 37 | // Testem prefers this... 38 | ENV.locationType = 'none'; 39 | 40 | // keep test console output quieter 41 | ENV.APP.LOG_ACTIVE_GENERATION = false; 42 | ENV.APP.LOG_VIEW_LOOKUPS = false; 43 | 44 | ENV.APP.rootElement = '#ember-testing'; 45 | } 46 | 47 | if (environment === 'production') { 48 | // here be dragons 49 | } 50 | 51 | return ENV; 52 | }; 53 | -------------------------------------------------------------------------------- /tests/dummy/public/crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /tests/dummy/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /tests/helpers/destroy-app.js: -------------------------------------------------------------------------------- 1 | import { run } from '@ember/runloop'; 2 | 3 | export default function destroyApp(application) { 4 | run(application, 'destroy'); 5 | } 6 | -------------------------------------------------------------------------------- /tests/helpers/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from '../../resolver'; 2 | import config from '../../config/environment'; 3 | 4 | const resolver = Resolver.create(); 5 | 6 | resolver.namespace = { 7 | modulePrefix: config.modulePrefix, 8 | podModulePrefix: config.podModulePrefix 9 | }; 10 | 11 | export default resolver; 12 | -------------------------------------------------------------------------------- /tests/helpers/start-app.js: -------------------------------------------------------------------------------- 1 | import { merge } from '@ember/polyfills'; 2 | import { run } from '@ember/runloop'; 3 | 4 | import Application from '../../app'; 5 | import config from '../../config/environment'; 6 | 7 | export default function startApp(attrs) { 8 | let attributes = merge({}, config.APP); 9 | attributes = merge(attributes, attrs); // use defaults, but you can override; 10 | 11 | return run(() => { 12 | let application = Application.create(attributes); 13 | application.setupForTesting(); 14 | application.injectTestHelpers(); 15 | return application; 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dummy Tests 7 | 8 | 9 | 10 | {{content-for "head"}} 11 | {{content-for "test-head"}} 12 | 13 | 14 | 15 | 16 | 17 | {{content-for "head-footer"}} 18 | {{content-for "test-head-footer"}} 19 | 20 | 21 | {{content-for "body"}} 22 | {{content-for "test-body"}} 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | {{content-for "body-footer"}} 32 | {{content-for "test-body-footer"}} 33 | 34 | 35 | -------------------------------------------------------------------------------- /tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import resolver from './helpers/resolver'; 2 | import { setResolver } from 'ember-mocha'; 3 | 4 | setResolver(resolver); 5 | -------------------------------------------------------------------------------- /tests/unit/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ember-cli/ember-cli-mocha/bdb5d8d5ac50ecb8d38101caff3e63a6040cc6be/tests/unit/.gitkeep --------------------------------------------------------------------------------