From f6c34060746aa87e75ba0b0d603512ec57573773 Mon Sep 17 00:00:00 2001 From: Tomster Date: Mon, 26 Mar 2018 10:48:11 +0200 Subject: [PATCH] Initial Commit from Ember CLI v2.18.2 _..., ,:^;,...; -+===;. ,,--++====++-,,, .: /....., :::::~+++++#:,+#++++++++++++++++++#*..: /,...... (,,,,,,::=+++##++++++++++++++++++++++#. :....../ ...,,,,,::++++++++++++++++++++++++++++++*..,...: *..+...,#@@@@@@@@@++++++++++++++++++++++#*....* @#,;##############@@@+*+#@@@@@@@@@@#*++#..< *@##@@+,-*^^^*-+@####@@@######@@@#####@@,,,+ @#@* @#@@@@#@@+--*^^*--#@@@@@@# @#@. @# @##+++@#, .@@#@@ #@# @@ +@@++++#@@ @@ :@@ :@#* @#@++++++@#* #@ @@+ :*+@@#;,.__.+@#@+,-^^.++@# @@++ ;* :*@@@##@@@@;++r._j^.+@##@+,.__,,@@++. /* ........+++++++++++++#@@@@@###@@#++++, ,: ...,@@@#++===----==@@@####,,....+++++ .: ......@@##@\ ; :@####@,,...... +++. ; .........@###, ; ;xx#@;,,..... *;+, | ........,*;xxxx--^--=xxx,........ :+#; ; ......,,;xxxxxxxxxxxxx;,..... *+# ; ......,::xxxx;. ...... +. . *; ......... +### .... / ,. /:| ,. .+: ... ;##++##, . ,#. (..v..;*./ ** ## ###* .:*&&&+. \.,....<, #&+**==-..,,__ ;## ### :,*+&&&&&&&v+#&,,.._/ #&&&&*...,::,,. ##; ,##* .*****;:&&&&&&&&& ,+*+;~*..*** *.* ### ###* ******* *+#&;* ##,;## **** :, ** ##### ## ### ###, ######## .##### ;## ## ####### ;## #### ,###. ########## ######## ### #### ### ### ### ########## #### #### ,## ### #######* ### ,### ##############: ## ### #### ,## :#### ### ##; ########## ########### ## .## ,### ####### ##### :###### ###### .###### #### ## ### ### ######* :##### #### ############# #### ################ ######## ### #####* *#* #: :### *###* *#### #* --- .editorconfig | 20 +++++ .ember-cli | 9 +++ .eslintrc.js | 57 ++++++++++++++ .gitignore | 23 ++++++ .npmignore | 21 ++++++ .travis.yml | 46 ++++++++++++ .watchmanconfig | 3 + LICENSE.md | 9 +++ README.md | 26 +++++++ addon/.gitkeep | 0 app/.gitkeep | 0 config/ember-try.js | 74 +++++++++++++++++++ config/environment.js | 5 ++ ember-cli-build.js | 18 +++++ index.js | 5 ++ package.json | 52 +++++++++++++ testem.js | 24 ++++++ tests/dummy/app/app.js | 14 ++++ tests/dummy/app/components/.gitkeep | 0 tests/dummy/app/controllers/.gitkeep | 0 tests/dummy/app/helpers/.gitkeep | 0 tests/dummy/app/index.html | 25 +++++++ tests/dummy/app/models/.gitkeep | 0 tests/dummy/app/resolver.js | 3 + tests/dummy/app/router.js | 12 +++ tests/dummy/app/routes/.gitkeep | 0 tests/dummy/app/styles/app.css | 0 tests/dummy/app/templates/application.hbs | 3 + tests/dummy/app/templates/components/.gitkeep | 0 tests/dummy/config/environment.js | 51 +++++++++++++ tests/dummy/config/targets.js | 8 ++ tests/dummy/public/robots.txt | 3 + tests/helpers/destroy-app.js | 5 ++ tests/helpers/module-for-acceptance.js | 21 ++++++ tests/helpers/start-app.js | 17 +++++ tests/index.html | 33 +++++++++ tests/integration/.gitkeep | 0 tests/test-helper.js | 8 ++ tests/unit/.gitkeep | 0 vendor/.gitkeep | 0 40 files changed, 595 insertions(+) create mode 100644 .editorconfig create mode 100644 .ember-cli create mode 100644 .eslintrc.js create mode 100644 .gitignore create mode 100644 .npmignore create mode 100644 .travis.yml create mode 100644 .watchmanconfig create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 addon/.gitkeep create mode 100644 app/.gitkeep create mode 100644 config/ember-try.js create mode 100644 config/environment.js create mode 100644 ember-cli-build.js create mode 100644 index.js create mode 100644 package.json create mode 100644 testem.js create mode 100644 tests/dummy/app/app.js create mode 100644 tests/dummy/app/components/.gitkeep create mode 100644 tests/dummy/app/controllers/.gitkeep create mode 100644 tests/dummy/app/helpers/.gitkeep create mode 100644 tests/dummy/app/index.html create mode 100644 tests/dummy/app/models/.gitkeep create mode 100644 tests/dummy/app/resolver.js create mode 100644 tests/dummy/app/router.js create mode 100644 tests/dummy/app/routes/.gitkeep create mode 100644 tests/dummy/app/styles/app.css create mode 100644 tests/dummy/app/templates/application.hbs create mode 100644 tests/dummy/app/templates/components/.gitkeep create mode 100644 tests/dummy/config/environment.js create mode 100644 tests/dummy/config/targets.js create mode 100644 tests/dummy/public/robots.txt create mode 100644 tests/helpers/destroy-app.js create mode 100644 tests/helpers/module-for-acceptance.js create mode 100644 tests/helpers/start-app.js create mode 100644 tests/index.html create mode 100644 tests/integration/.gitkeep create mode 100644 tests/test-helper.js create mode 100644 tests/unit/.gitkeep create mode 100644 vendor/.gitkeep diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..219985c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,20 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 2 + +[*.hbs] +insert_final_newline = false + +[*.{diff,md}] +trim_trailing_whitespace = false diff --git a/.ember-cli b/.ember-cli new file mode 100644 index 0000000..ee64cfe --- /dev/null +++ b/.ember-cli @@ -0,0 +1,9 @@ +{ + /** + Ember CLI sends analytics information by default. The data is completely + anonymous, but there are times when you might want to disable this behavior. + + Setting `disableAnalytics` to true will prevent any data from being sent. + */ + "disableAnalytics": false +} diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..3a07c6b --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,57 @@ +module.exports = { + root: true, + parserOptions: { + ecmaVersion: 2017, + sourceType: 'module' + }, + plugins: [ + 'ember' + ], + extends: [ + 'eslint:recommended', + 'plugin:ember/recommended' + ], + env: { + browser: true + }, + rules: { + }, + overrides: [ + // node files + { + files: [ + 'index.js', + 'testem.js', + 'ember-cli-build.js', + 'config/**/*.js', + 'tests/dummy/config/**/*.js' + ], + excludedFiles: [ + 'app/**', + 'addon/**', + 'tests/dummy/app/**' + ], + parserOptions: { + sourceType: 'script', + ecmaVersion: 2015 + }, + env: { + browser: false, + node: true + }, + plugins: ['node'], + rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { + // add your custom rules and overrides for node files here + }) + }, + + // test files + { + files: ['tests/**/*.js'], + excludedFiles: ['tests/dummy/**/*.js'], + env: { + embertest: true + } + } + ] +}; diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8fa39a6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist +/tmp + +# dependencies +/node_modules +/bower_components + +# misc +/.sass-cache +/connect.lock +/coverage/* +/libpeerconnection.log +npm-debug.log* +yarn-error.log +testem.log + +# ember-try +.node_modules.ember-try/ +bower.json.ember-try +package.json.ember-try diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..135c7b1 --- /dev/null +++ b/.npmignore @@ -0,0 +1,21 @@ +/bower_components +/config/ember-try.js +/dist +/tests +/tmp +**/.gitkeep +.bowerrc +.editorconfig +.ember-cli +.eslintrc.js +.gitignore +.watchmanconfig +.travis.yml +bower.json +ember-cli-build.js +testem.js + +# ember-try +.node_modules.ember-try/ +bower.json.ember-try +package.json.ember-try diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5b24d5f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,46 @@ +--- +language: node_js +node_js: + # we recommend testing addons with the same minimum supported node version as Ember CLI + # so that your addon works for all apps + - "4" + +sudo: false +dist: trusty + +addons: + chrome: stable + +cache: + directories: + - $HOME/.npm + +env: + global: + # See https://git.io/vdao3 for details. + - JOBS=1 + matrix: + # we recommend new addons test the current and previous LTS + # as well as latest stable release (bonus points to beta/canary) + - EMBER_TRY_SCENARIO=ember-lts-2.12 + - EMBER_TRY_SCENARIO=ember-lts-2.16 + - EMBER_TRY_SCENARIO=ember-release + - EMBER_TRY_SCENARIO=ember-beta + - EMBER_TRY_SCENARIO=ember-canary + - EMBER_TRY_SCENARIO=ember-default + +matrix: + fast_finish: true + allow_failures: + - env: EMBER_TRY_SCENARIO=ember-canary + +before_install: + - npm config set spin false + - npm install -g npm@4 + - npm --version + +script: + - npm run lint:js + # Usually, it's ok to finish the test scenario without reverting + # to the addon's original dependency state, skipping "cleanup". + - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup diff --git a/.watchmanconfig b/.watchmanconfig new file mode 100644 index 0000000..e7834e3 --- /dev/null +++ b/.watchmanconfig @@ -0,0 +1,3 @@ +{ + "ignore_dirs": ["tmp", "dist"] +} diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..198f6da --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2018 + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..ec04bf1 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# ember-cli-pace + +This README outlines the details of collaborating on this Ember addon. + +## Installation + +* `git clone ` this repository +* `cd ember-cli-pace` +* `npm install` + +## Running + +* `ember serve` +* Visit your app at [http://localhost:4200](http://localhost:4200). + +## Running Tests + +* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions) +* `ember test` +* `ember test --server` + +## Building + +* `ember build` + +For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). diff --git a/addon/.gitkeep b/addon/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/app/.gitkeep b/app/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/config/ember-try.js b/config/ember-try.js new file mode 100644 index 0000000..1c31c54 --- /dev/null +++ b/config/ember-try.js @@ -0,0 +1,74 @@ +module.exports = { + scenarios: [ + { + name: 'ember-lts-2.12', + npm: { + devDependencies: { + 'ember-source': '~2.12.0' + } + } + }, + { + name: 'ember-lts-2.16', + npm: { + devDependencies: { + 'ember-source': '~2.16.0' + } + } + }, + { + name: 'ember-release', + bower: { + dependencies: { + 'ember': 'components/ember#release' + }, + resolutions: { + 'ember': 'release' + } + }, + npm: { + devDependencies: { + 'ember-source': null + } + } + }, + { + name: 'ember-beta', + bower: { + dependencies: { + 'ember': 'components/ember#beta' + }, + resolutions: { + 'ember': 'beta' + } + }, + npm: { + devDependencies: { + 'ember-source': null + } + } + }, + { + name: 'ember-canary', + bower: { + dependencies: { + 'ember': 'components/ember#canary' + }, + resolutions: { + 'ember': 'canary' + } + }, + npm: { + devDependencies: { + 'ember-source': null + } + } + }, + { + name: 'ember-default', + npm: { + devDependencies: {} + } + } + ] +}; diff --git a/config/environment.js b/config/environment.js new file mode 100644 index 0000000..0dfaed4 --- /dev/null +++ b/config/environment.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function(/* environment, appConfig */) { + return { }; +}; diff --git a/ember-cli-build.js b/ember-cli-build.js new file mode 100644 index 0000000..dc5a39e --- /dev/null +++ b/ember-cli-build.js @@ -0,0 +1,18 @@ +'use strict'; + +const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); + +module.exports = function(defaults) { + let app = new EmberAddon(defaults, { + // Add options here + }); + + /* + This build file specifies the options for the dummy test app of this + addon, located in `/tests/dummy` + This build file does *not* influence how the addon or the app using it + behave. You most likely want to be modifying `./index.js` or app's build file + */ + + return app.toTree(); +}; diff --git a/index.js b/index.js new file mode 100644 index 0000000..c90416d --- /dev/null +++ b/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + name: 'ember-cli-pace' +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..f174507 --- /dev/null +++ b/package.json @@ -0,0 +1,52 @@ +{ + "name": "ember-cli-pace", + "version": "0.0.0", + "description": "The default blueprint for ember-cli addons.", + "keywords": [ + "ember-addon" + ], + "license": "MIT", + "author": "", + "directories": { + "doc": "doc", + "test": "tests" + }, + "repository": "", + "scripts": { + "build": "ember build", + "lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests", + "start": "ember serve", + "test": "ember try:each" + }, + "dependencies": { + "ember-cli-babel": "^6.6.0" + }, + "devDependencies": { + "broccoli-asset-rev": "^2.4.5", + "ember-ajax": "^3.0.0", + "ember-cli": "~2.18.2", + "ember-cli-dependency-checker": "^2.0.0", + "ember-cli-eslint": "^4.2.1", + "ember-cli-htmlbars": "^2.0.1", + "ember-cli-htmlbars-inline-precompile": "^1.0.0", + "ember-cli-inject-live-reload": "^1.4.1", + "ember-cli-qunit": "^4.1.1", + "ember-cli-shims": "^1.2.0", + "ember-cli-sri": "^2.1.0", + "ember-cli-uglify": "^2.0.0", + "ember-disable-prototype-extensions": "^1.1.2", + "ember-export-application-global": "^2.0.0", + "ember-load-initializers": "^1.0.0", + "ember-resolver": "^4.0.0", + "ember-source": "~2.18.0", + "eslint-plugin-ember": "^5.0.0", + "eslint-plugin-node": "^5.2.1", + "loader.js": "^4.2.3" + }, + "engines": { + "node": "^4.5 || 6.* || >= 7.*" + }, + "ember-addon": { + "configPath": "tests/dummy/config" + } +} diff --git a/testem.js b/testem.js new file mode 100644 index 0000000..d1755a4 --- /dev/null +++ b/testem.js @@ -0,0 +1,24 @@ +module.exports = { + test_page: 'tests/index.html?hidepassed', + disable_watching: true, + launch_in_ci: [ + 'Chrome' + ], + launch_in_dev: [ + 'Chrome' + ], + browser_args: { + Chrome: { + mode: 'ci', + args: [ + // --no-sandbox is needed when running Chrome inside a container + process.env.TRAVIS ? '--no-sandbox' : null, + + '--disable-gpu', + '--headless', + '--remote-debugging-port=0', + '--window-size=1440,900' + ].filter(Boolean) + } + } +}; diff --git a/tests/dummy/app/app.js b/tests/dummy/app/app.js new file mode 100644 index 0000000..b3b2bd6 --- /dev/null +++ b/tests/dummy/app/app.js @@ -0,0 +1,14 @@ +import Application from '@ember/application'; +import Resolver from './resolver'; +import loadInitializers from 'ember-load-initializers'; +import config from './config/environment'; + +const App = Application.extend({ + modulePrefix: config.modulePrefix, + podModulePrefix: config.podModulePrefix, + Resolver +}); + +loadInitializers(App, config.modulePrefix); + +export default App; diff --git a/tests/dummy/app/components/.gitkeep b/tests/dummy/app/components/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/dummy/app/controllers/.gitkeep b/tests/dummy/app/controllers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/dummy/app/helpers/.gitkeep b/tests/dummy/app/helpers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/dummy/app/index.html b/tests/dummy/app/index.html new file mode 100644 index 0000000..61400b2 --- /dev/null +++ b/tests/dummy/app/index.html @@ -0,0 +1,25 @@ + + + + + + Dummy + + + + {{content-for "head"}} + + + + + {{content-for "head-footer"}} + + + {{content-for "body"}} + + + + + {{content-for "body-footer"}} + + diff --git a/tests/dummy/app/models/.gitkeep b/tests/dummy/app/models/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/dummy/app/resolver.js b/tests/dummy/app/resolver.js new file mode 100644 index 0000000..2fb563d --- /dev/null +++ b/tests/dummy/app/resolver.js @@ -0,0 +1,3 @@ +import Resolver from 'ember-resolver'; + +export default Resolver; diff --git a/tests/dummy/app/router.js b/tests/dummy/app/router.js new file mode 100644 index 0000000..d0bb009 --- /dev/null +++ b/tests/dummy/app/router.js @@ -0,0 +1,12 @@ +import EmberRouter from '@ember/routing/router'; +import config from './config/environment'; + +const Router = EmberRouter.extend({ + location: config.locationType, + rootURL: config.rootURL +}); + +Router.map(function() { +}); + +export default Router; diff --git a/tests/dummy/app/routes/.gitkeep b/tests/dummy/app/routes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/dummy/app/styles/app.css b/tests/dummy/app/styles/app.css new file mode 100644 index 0000000..e69de29 diff --git a/tests/dummy/app/templates/application.hbs b/tests/dummy/app/templates/application.hbs new file mode 100644 index 0000000..5230580 --- /dev/null +++ b/tests/dummy/app/templates/application.hbs @@ -0,0 +1,3 @@ +

Welcome to Ember

+ +{{outlet}} \ No newline at end of file diff --git a/tests/dummy/app/templates/components/.gitkeep b/tests/dummy/app/templates/components/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/dummy/config/environment.js b/tests/dummy/config/environment.js new file mode 100644 index 0000000..182d3fc --- /dev/null +++ b/tests/dummy/config/environment.js @@ -0,0 +1,51 @@ +'use strict'; + +module.exports = function(environment) { + let ENV = { + modulePrefix: 'dummy', + environment, + rootURL: '/', + locationType: 'auto', + EmberENV: { + FEATURES: { + // Here you can enable experimental features on an ember canary build + // e.g. 'with-controller': true + }, + EXTEND_PROTOTYPES: { + // Prevent Ember Data from overriding Date.parse. + Date: false + } + }, + + APP: { + // Here you can pass flags/options to your application instance + // when it is created + } + }; + + if (environment === 'development') { + // ENV.APP.LOG_RESOLVER = true; + // ENV.APP.LOG_ACTIVE_GENERATION = true; + // ENV.APP.LOG_TRANSITIONS = true; + // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; + // ENV.APP.LOG_VIEW_LOOKUPS = true; + } + + if (environment === 'test') { + // Testem prefers this... + ENV.locationType = 'none'; + + // keep test console output quieter + ENV.APP.LOG_ACTIVE_GENERATION = false; + ENV.APP.LOG_VIEW_LOOKUPS = false; + + ENV.APP.rootElement = '#ember-testing'; + ENV.APP.autoboot = false; + } + + if (environment === 'production') { + // here you can enable a production-specific feature + } + + return ENV; +}; diff --git a/tests/dummy/config/targets.js b/tests/dummy/config/targets.js new file mode 100644 index 0000000..082e68b --- /dev/null +++ b/tests/dummy/config/targets.js @@ -0,0 +1,8 @@ +module.exports = { + browsers: [ + 'ie 9', + 'last 1 Chrome versions', + 'last 1 Firefox versions', + 'last 1 Safari versions' + ] +}; diff --git a/tests/dummy/public/robots.txt b/tests/dummy/public/robots.txt new file mode 100644 index 0000000..f591645 --- /dev/null +++ b/tests/dummy/public/robots.txt @@ -0,0 +1,3 @@ +# http://www.robotstxt.org +User-agent: * +Disallow: diff --git a/tests/helpers/destroy-app.js b/tests/helpers/destroy-app.js new file mode 100644 index 0000000..e7f983b --- /dev/null +++ b/tests/helpers/destroy-app.js @@ -0,0 +1,5 @@ +import { run } from '@ember/runloop'; + +export default function destroyApp(application) { + run(application, 'destroy'); +} diff --git a/tests/helpers/module-for-acceptance.js b/tests/helpers/module-for-acceptance.js new file mode 100644 index 0000000..90a93ba --- /dev/null +++ b/tests/helpers/module-for-acceptance.js @@ -0,0 +1,21 @@ +import { module } from 'qunit'; +import { resolve } from 'rsvp'; +import startApp from '../helpers/start-app'; +import destroyApp from '../helpers/destroy-app'; + +export default function(name, options = {}) { + module(name, { + beforeEach() { + this.application = startApp(); + + if (options.beforeEach) { + return options.beforeEach.apply(this, arguments); + } + }, + + afterEach() { + let afterEach = options.afterEach && options.afterEach.apply(this, arguments); + return resolve(afterEach).then(() => destroyApp(this.application)); + } + }); +} diff --git a/tests/helpers/start-app.js b/tests/helpers/start-app.js new file mode 100644 index 0000000..99d35dc --- /dev/null +++ b/tests/helpers/start-app.js @@ -0,0 +1,17 @@ +import Application from '../../app'; +import config from '../../config/environment'; +import { merge } from '@ember/polyfills'; +import { run } from '@ember/runloop'; + +export default function startApp(attrs) { + let attributes = merge({}, config.APP); + attributes.autoboot = true; + attributes = merge(attributes, attrs); // use defaults, but you can override; + + return run(() => { + let application = Application.create(attributes); + application.setupForTesting(); + application.injectTestHelpers(); + return application; + }); +} diff --git a/tests/index.html b/tests/index.html new file mode 100644 index 0000000..5209b85 --- /dev/null +++ b/tests/index.html @@ -0,0 +1,33 @@ + + + + + + Dummy Tests + + + + {{content-for "head"}} + {{content-for "test-head"}} + + + + + + {{content-for "head-footer"}} + {{content-for "test-head-footer"}} + + + {{content-for "body"}} + {{content-for "test-body"}} + + + + + + + + {{content-for "body-footer"}} + {{content-for "test-body-footer"}} + + diff --git a/tests/integration/.gitkeep b/tests/integration/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/test-helper.js b/tests/test-helper.js new file mode 100644 index 0000000..0382a84 --- /dev/null +++ b/tests/test-helper.js @@ -0,0 +1,8 @@ +import Application from '../app'; +import config from '../config/environment'; +import { setApplication } from '@ember/test-helpers'; +import { start } from 'ember-qunit'; + +setApplication(Application.create(config.APP)); + +start(); diff --git a/tests/unit/.gitkeep b/tests/unit/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/vendor/.gitkeep b/vendor/.gitkeep new file mode 100644 index 0000000..e69de29