From 78cdb7a7fdc556390faca7ccee656f80b2e1acb4 Mon Sep 17 00:00:00 2001 From: Sergey Astapov Date: Wed, 11 May 2022 00:14:51 -0400 Subject: [PATCH] chore: extract test-app into own package --- .github/workflows/ci.yml | 8 +- .gitignore | 8 ++ package.json | 14 +++- packages/ember-cookies/.eslintrc.js | 13 +--- packages/ember-cookies/ember-cli-build.js | 18 ----- packages/ember-cookies/package.json | 48 +----------- .../ember-cookies/tests/dummy/.eslintrc.js | 12 --- .../tests/dummy/config/ember-cli-update.json | 21 ----- packages/test-app/.babelrc.js | 9 +++ .../{ember-cookies => test-app}/.editorconfig | 0 .../{ember-cookies => test-app}/.ember-cli | 0 packages/test-app/.eslintignore | 22 ++++++ packages/test-app/.eslintrc.js | 53 +++++++++++++ packages/test-app/.gitignore | 24 ++++++ packages/test-app/.npmignore | 18 +++++ packages/test-app/.prettierrc.js | 9 +++ .../.watchmanconfig | 0 .../tests/dummy => test-app}/app/app.js | 2 +- .../app/components/.gitkeep | 0 .../app/controllers/.gitkeep | 0 .../app/controllers/index.js | 0 .../dummy => test-app}/app/helpers/.gitkeep | 0 .../tests/dummy => test-app}/app/index.html | 4 +- .../dummy => test-app}/app/models/.gitkeep | 0 .../tests/dummy => test-app}/app/resolver.js | 0 .../tests/dummy => test-app}/app/router.js | 2 +- .../dummy => test-app}/app/routes/.gitkeep | 0 .../dummy => test-app}/app/styles/app.css | 0 .../app/templates/application.hbs | 0 .../app/templates/components/.gitkeep | 0 .../app/templates/index.hbs | 0 .../config/ember-try.js | 1 + .../dummy => test-app}/config/environment.js | 2 +- .../config/optional-features.json | 0 .../dummy => test-app}/config/targets.js | 0 packages/test-app/ember-cli-build.js | 11 +++ packages/test-app/package.json | 78 +++++++++++++++++++ .../dummy => test-app}/public/crossdomain.xml | 0 .../dummy => test-app}/public/robots.txt | 0 .../{ember-cookies => test-app}/testem.js | 0 .../tests/fastboot/cookie-access-test.js | 0 .../tests/helpers/resolver.js | 0 .../tests/index.html | 4 +- .../tests/integration/.gitkeep | 0 .../tests/test-helper.js | 0 .../tests/unit/.gitkeep | 0 .../tests/unit/clear-all-cookies-test.js | 0 .../tests/unit/services/cookies-test.js | 0 48 files changed, 261 insertions(+), 120 deletions(-) create mode 100644 .gitignore delete mode 100644 packages/ember-cookies/ember-cli-build.js delete mode 100644 packages/ember-cookies/tests/dummy/.eslintrc.js delete mode 100644 packages/ember-cookies/tests/dummy/config/ember-cli-update.json create mode 100644 packages/test-app/.babelrc.js rename packages/{ember-cookies => test-app}/.editorconfig (100%) rename packages/{ember-cookies => test-app}/.ember-cli (100%) create mode 100644 packages/test-app/.eslintignore create mode 100644 packages/test-app/.eslintrc.js create mode 100644 packages/test-app/.gitignore create mode 100644 packages/test-app/.npmignore create mode 100644 packages/test-app/.prettierrc.js rename packages/{ember-cookies => test-app}/.watchmanconfig (100%) rename packages/{ember-cookies/tests/dummy => test-app}/app/app.js (87%) rename packages/{ember-cookies/tests/dummy => test-app}/app/components/.gitkeep (100%) rename packages/{ember-cookies/tests/dummy => test-app}/app/controllers/.gitkeep (100%) rename packages/{ember-cookies/tests/dummy => test-app}/app/controllers/index.js (100%) rename packages/{ember-cookies/tests/dummy => test-app}/app/helpers/.gitkeep (100%) rename packages/{ember-cookies/tests/dummy => test-app}/app/index.html (89%) rename packages/{ember-cookies/tests/dummy => test-app}/app/models/.gitkeep (100%) rename packages/{ember-cookies/tests/dummy => test-app}/app/resolver.js (100%) rename packages/{ember-cookies/tests/dummy => test-app}/app/router.js (79%) rename packages/{ember-cookies/tests/dummy => test-app}/app/routes/.gitkeep (100%) rename packages/{ember-cookies/tests/dummy => test-app}/app/styles/app.css (100%) rename packages/{ember-cookies/tests/dummy => test-app}/app/templates/application.hbs (100%) rename packages/{ember-cookies/tests/dummy => test-app}/app/templates/components/.gitkeep (100%) rename packages/{ember-cookies/tests/dummy => test-app}/app/templates/index.hbs (100%) rename packages/{ember-cookies => test-app}/config/ember-try.js (98%) rename packages/{ember-cookies/tests/dummy => test-app}/config/environment.js (97%) rename packages/{ember-cookies/tests/dummy => test-app}/config/optional-features.json (100%) rename packages/{ember-cookies/tests/dummy => test-app}/config/targets.js (100%) create mode 100644 packages/test-app/ember-cli-build.js create mode 100644 packages/test-app/package.json rename packages/{ember-cookies/tests/dummy => test-app}/public/crossdomain.xml (100%) rename packages/{ember-cookies/tests/dummy => test-app}/public/robots.txt (100%) rename packages/{ember-cookies => test-app}/testem.js (100%) rename packages/{ember-cookies => test-app}/tests/fastboot/cookie-access-test.js (100%) rename packages/{ember-cookies => test-app}/tests/helpers/resolver.js (100%) rename packages/{ember-cookies => test-app}/tests/index.html (89%) rename packages/{ember-cookies => test-app}/tests/integration/.gitkeep (100%) rename packages/{ember-cookies => test-app}/tests/test-helper.js (100%) rename packages/{ember-cookies => test-app}/tests/unit/.gitkeep (100%) rename packages/{ember-cookies => test-app}/tests/unit/clear-all-cookies-test.js (100%) rename packages/{ember-cookies => test-app}/tests/unit/services/cookies-test.js (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3fbc0fb8..07abbf3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,9 +27,9 @@ jobs: cache: yarn - run: yarn install --frozen-lockfile + - name: Lint - run: yarn lint:js - working-directory: packages/ember-cookies + run: yarn lint tests: name: Tests @@ -67,7 +67,7 @@ jobs: - name: tests run: yarn test:one ${{ matrix.test-suite }} continue-on-error: ${{matrix.allow-failure}} - working-directory: packages/ember-cookies + working-directory: packages/test-app extra-tests: name: Tests (Floating Dependencies) @@ -86,4 +86,4 @@ jobs: - name: tests run: yarn test continue-on-error: true - working-directory: packages/ember-cookies + working-directory: packages/test-app diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..b15a28f3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# dependencies +/node_modules + +# misc +npm-debug.log* +yarn-error.log diff --git a/package.json b/package.json index 6f987da1..ee19f4e2 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,20 @@ { "version": "0.5.2", "private": true, + "repository": "https://github.com/simplabs/ember-cookies", + "license": "MIT", "workspaces": [ "packages/*" ], - "repository": "https://github.com/simplabs/ember-cookies" + "scripts": { + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"", + "lint:addon": "yarn workspace ember-cookies run lint", + "lint:test-app": "yarn workspace test-app run lint", + "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:fix:*", + "lint:fix:addon": "yarn workspace ember-cookies run lint:fix", + "lint:fix:test-app": "yarn workspace test-app run lint:fix" + }, + "devDependencies": { + "npm-run-all": "^4.1.5" + } } \ No newline at end of file diff --git a/packages/ember-cookies/.eslintrc.js b/packages/ember-cookies/.eslintrc.js index 90865331..1c69472c 100644 --- a/packages/ember-cookies/.eslintrc.js +++ b/packages/ember-cookies/.eslintrc.js @@ -24,15 +24,11 @@ module.exports = { '.eslintrc.js', '**/.eslintrc.js', '.prettierrc.js', - '.template-lintrc.js', - 'ember-cli-build.js', 'index.js', - 'testem.js', 'blueprints/*/index.js', 'config/**/*.js', - 'tests/dummy/config/**/*.js', ], - excludedFiles: ['addon/**', 'addon-test-support/**', 'app/**', 'tests/dummy/app/**'], + excludedFiles: ['addon/**', 'addon-test-support/**'], parserOptions: { sourceType: 'script', }, @@ -43,12 +39,5 @@ module.exports = { plugins: ['node'], extends: ['plugin:node/recommended'], }, - // test files - { - files: ['tests/**/*-test.js'], - excludedFiles: ['tests/dummy/**'], - plugins: ['qunit'], - extends: ['plugin:qunit/recommended'], - }, ], }; diff --git a/packages/ember-cookies/ember-cli-build.js b/packages/ember-cookies/ember-cli-build.js deleted file mode 100644 index 6f5c605d..00000000 --- a/packages/ember-cookies/ember-cli-build.js +++ /dev/null @@ -1,18 +0,0 @@ -/* eslint-env node */ -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 - */ - - const { maybeEmbroider } = require('@embroider/test-setup'); - return maybeEmbroider(app); -}; diff --git a/packages/ember-cookies/package.json b/packages/ember-cookies/package.json index 373f9422..e0baac85 100644 --- a/packages/ember-cookies/package.json +++ b/packages/ember-cookies/package.json @@ -13,13 +13,9 @@ }, "repository": "https://github.com/simplabs/ember-cookies", "scripts": { - "build": "ember build", + "lint": "yarn lint:js", "lint:js": "eslint . --cache", - "nodetest": "node node-tests/runner.js", - "start": "ember server", - "test": "ember test", - "test:all": "ember try:each", - "test:one": "ember try:one" + "lint:js:fix": "eslint . --fix" }, "dependencies": { "ember-cli-babel": "^7.26.3", @@ -27,49 +23,12 @@ }, "devDependencies": { "@babel/eslint-parser": "^7.17.0", - "@ember/optional-features": "^2.0.0", - "@ember/test-helpers": "^2.5.0", - "@embroider/test-setup": "1.6.0", - "@glimmer/component": "^1.0.4", - "@glimmer/tracking": "^1.0.4", - "broccoli-asset-rev": "^3.0.0", - "chai": "^4.1.0", - "ember-auto-import": "^2.4.0", - "ember-cli": "~4.3.0", - "ember-cli-chai": "^0.5.0", - "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-fastboot": "^3.2.0-beta.4", - "ember-cli-fastboot-testing": "^0.6.0", - "ember-cli-htmlbars": "^6.0.0", - "ember-cli-inject-live-reload": "^2.0.2", - "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.1", - "ember-disable-prototype-extensions": "^1.1.3", - "ember-export-application-global": "^2.0.1", - "ember-load-initializers": "^2.1.2", - "ember-maybe-import-regenerator": "^1.0.0", - "ember-page-title": "^7.0.0", - "ember-qunit": "^5.1.5", - "ember-resolver": "^8.0.2", - "ember-sinon": "5.0.0", - "ember-source": "~4.3.0", - "ember-source-channel-url": "^3.0.0", - "ember-try": "^2.0.0", "eslint": "^8.0.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-ember": "^10.3.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^4.0.0", - "eslint-plugin-qunit": "^7.2.0", - "glob": "^8.0.0", - "loader.js": "^4.7.0", - "npm-run-all": "^4.1.5", - "prettier": "2.6.2", - "qunit": "^2.16.0", - "request": "^2.88.2", - "rsvp": "^4.8.5", - "symlink-or-copy": "^1.1.8", - "webpack": "^5.70.0" + "prettier": "2.6.2" }, "engines": { "node": ">= 12.*" @@ -78,7 +37,6 @@ "edition": "octane" }, "ember-addon": { - "configPath": "tests/dummy/config", "versionCompatibility": { "ember": ">=3.4" } diff --git a/packages/ember-cookies/tests/dummy/.eslintrc.js b/packages/ember-cookies/tests/dummy/.eslintrc.js deleted file mode 100644 index 4f9ce5ae..00000000 --- a/packages/ember-cookies/tests/dummy/.eslintrc.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports = { - overrides: [ - { - files: ['**/*.js'], - rules: { - 'ember/no-classic-classes': 'off', - }, - }, - ], -}; diff --git a/packages/ember-cookies/tests/dummy/config/ember-cli-update.json b/packages/ember-cookies/tests/dummy/config/ember-cli-update.json deleted file mode 100644 index ed844ebc..00000000 --- a/packages/ember-cookies/tests/dummy/config/ember-cli-update.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "schemaVersion": "1.0.0", - "packages": [ - { - "name": "ember-cli", - "version": "3.26.1", - "blueprints": [ - { - "name": "addon", - "outputRepo": "https://github.com/ember-cli/ember-addon-output", - "codemodsSource": "ember-addon-codemods-manifest@1", - "isBaseBlueprint": true, - "options": [ - "--welcome", - "--yarn" - ] - } - ] - } - ] -} diff --git a/packages/test-app/.babelrc.js b/packages/test-app/.babelrc.js new file mode 100644 index 00000000..ec8a419f --- /dev/null +++ b/packages/test-app/.babelrc.js @@ -0,0 +1,9 @@ +const { buildEmberPlugins } = require('ember-cli-babel'); + +module.exports = function (api) { + api.cache(true); + + return { + plugins: [...buildEmberPlugins(__dirname)], + }; +}; diff --git a/packages/ember-cookies/.editorconfig b/packages/test-app/.editorconfig similarity index 100% rename from packages/ember-cookies/.editorconfig rename to packages/test-app/.editorconfig diff --git a/packages/ember-cookies/.ember-cli b/packages/test-app/.ember-cli similarity index 100% rename from packages/ember-cookies/.ember-cli rename to packages/test-app/.ember-cli diff --git a/packages/test-app/.eslintignore b/packages/test-app/.eslintignore new file mode 100644 index 00000000..cf068c75 --- /dev/null +++ b/packages/test-app/.eslintignore @@ -0,0 +1,22 @@ +/node-tests/fixtures/ + +# unconventional js +/blueprints/*/files/ +/vendor/ + +# compiled output +/dist/ +/tmp/ + +# dependencies +/bower_components/ +/node_modules/ + +# misc +/coverage/ +!.* + +# ember-try +/.node_modules.ember-try/ +/bower.json.ember-try +/package.json.ember-try diff --git a/packages/test-app/.eslintrc.js b/packages/test-app/.eslintrc.js new file mode 100644 index 00000000..0689097a --- /dev/null +++ b/packages/test-app/.eslintrc.js @@ -0,0 +1,53 @@ +'use strict'; + +module.exports = { + root: true, + parser: '@babel/eslint-parser', + parserOptions: { + ecmaVersion: 2020, + sourceType: 'module', + ecmaFeatures: { + legacyDecorators: true, + }, + }, + plugins: ['ember'], + extends: ['eslint:recommended', 'plugin:ember/recommended', 'plugin:prettier/recommended'], + env: { + browser: true, + }, + rules: { + 'ember/no-classic-classes': 'off', + }, + overrides: [ + // node files + { + files: [ + '.babelrc.js', + '.eslintrc.js', + '**/.eslintrc.js', + '.prettierrc.js', + '.template-lintrc.js', + 'ember-cli-build.js', + 'testem.js', + 'blueprints/*/index.js', + 'config/**/*.js', + ], + excludedFiles: ['app/**'], + parserOptions: { + sourceType: 'script', + }, + env: { + browser: false, + node: true, + }, + plugins: ['node'], + extends: ['plugin:node/recommended'], + }, + // test files + { + files: ['tests/**/*-test.js'], + plugins: ['qunit'], + extends: ['plugin:qunit/recommended'], + }, + ], +}; diff --git a/packages/test-app/.gitignore b/packages/test-app/.gitignore new file mode 100644 index 00000000..03578211 --- /dev/null +++ b/packages/test-app/.gitignore @@ -0,0 +1,24 @@ +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist +/tmp + +# dependencies +/node_modules +/bower_components + +# misc +/.eslintcache +/.sass-cache +/connect.lock +/coverage/* +/libpeerconnection.log +npm-debug.log* +yarn-error.log +testem.log +.DS_Store + +# ember-try +.node_modules.ember-try/ +package.json.ember-try diff --git a/packages/test-app/.npmignore b/packages/test-app/.npmignore new file mode 100644 index 00000000..a212d724 --- /dev/null +++ b/packages/test-app/.npmignore @@ -0,0 +1,18 @@ +/.node_modules.ember-try +/bower_components +/config/ember-try.js +/dist +/node-tests +/tests +/tmp +**/.gitkeep +.babelrc.js +.bowerrc +.editorconfig +.ember-cli +.gitignore +.eslintrc.js +.watchmanconfig +bower.json +ember-cli-build.js +testem.js diff --git a/packages/test-app/.prettierrc.js b/packages/test-app/.prettierrc.js new file mode 100644 index 00000000..70d17558 --- /dev/null +++ b/packages/test-app/.prettierrc.js @@ -0,0 +1,9 @@ +'use strict'; + +module.exports = { + printWidth: 100, + semi: true, + arrowParens: 'avoid', + singleQuote: true, + trailingComma: 'es5', +}; diff --git a/packages/ember-cookies/.watchmanconfig b/packages/test-app/.watchmanconfig similarity index 100% rename from packages/ember-cookies/.watchmanconfig rename to packages/test-app/.watchmanconfig diff --git a/packages/ember-cookies/tests/dummy/app/app.js b/packages/test-app/app/app.js similarity index 87% rename from packages/ember-cookies/tests/dummy/app/app.js rename to packages/test-app/app/app.js index 523bad60..1ba93424 100644 --- a/packages/ember-cookies/tests/dummy/app/app.js +++ b/packages/test-app/app/app.js @@ -1,7 +1,7 @@ import Application from '@ember/application'; import Resolver from 'ember-resolver'; import loadInitializers from 'ember-load-initializers'; -import config from 'dummy/config/environment'; +import config from 'test-app/config/environment'; export default class App extends Application { modulePrefix = config.modulePrefix; diff --git a/packages/ember-cookies/tests/dummy/app/components/.gitkeep b/packages/test-app/app/components/.gitkeep similarity index 100% rename from packages/ember-cookies/tests/dummy/app/components/.gitkeep rename to packages/test-app/app/components/.gitkeep diff --git a/packages/ember-cookies/tests/dummy/app/controllers/.gitkeep b/packages/test-app/app/controllers/.gitkeep similarity index 100% rename from packages/ember-cookies/tests/dummy/app/controllers/.gitkeep rename to packages/test-app/app/controllers/.gitkeep diff --git a/packages/ember-cookies/tests/dummy/app/controllers/index.js b/packages/test-app/app/controllers/index.js similarity index 100% rename from packages/ember-cookies/tests/dummy/app/controllers/index.js rename to packages/test-app/app/controllers/index.js diff --git a/packages/ember-cookies/tests/dummy/app/helpers/.gitkeep b/packages/test-app/app/helpers/.gitkeep similarity index 100% rename from packages/ember-cookies/tests/dummy/app/helpers/.gitkeep rename to packages/test-app/app/helpers/.gitkeep diff --git a/packages/ember-cookies/tests/dummy/app/index.html b/packages/test-app/app/index.html similarity index 89% rename from packages/ember-cookies/tests/dummy/app/index.html rename to packages/test-app/app/index.html index 61400b20..bd02ea27 100644 --- a/packages/ember-cookies/tests/dummy/app/index.html +++ b/packages/test-app/app/index.html @@ -10,7 +10,7 @@ {{content-for "head"}} - + {{content-for "head-footer"}} @@ -18,7 +18,7 @@ {{content-for "body"}} - + {{content-for "body-footer"}} diff --git a/packages/ember-cookies/tests/dummy/app/models/.gitkeep b/packages/test-app/app/models/.gitkeep similarity index 100% rename from packages/ember-cookies/tests/dummy/app/models/.gitkeep rename to packages/test-app/app/models/.gitkeep diff --git a/packages/ember-cookies/tests/dummy/app/resolver.js b/packages/test-app/app/resolver.js similarity index 100% rename from packages/ember-cookies/tests/dummy/app/resolver.js rename to packages/test-app/app/resolver.js diff --git a/packages/ember-cookies/tests/dummy/app/router.js b/packages/test-app/app/router.js similarity index 79% rename from packages/ember-cookies/tests/dummy/app/router.js rename to packages/test-app/app/router.js index 64e543ab..38a0b80a 100644 --- a/packages/ember-cookies/tests/dummy/app/router.js +++ b/packages/test-app/app/router.js @@ -1,5 +1,5 @@ import EmberRouter from '@ember/routing/router'; -import config from 'dummy/config/environment'; +import config from 'test-app/config/environment'; export default class Router extends EmberRouter { location = config.locationType; diff --git a/packages/ember-cookies/tests/dummy/app/routes/.gitkeep b/packages/test-app/app/routes/.gitkeep similarity index 100% rename from packages/ember-cookies/tests/dummy/app/routes/.gitkeep rename to packages/test-app/app/routes/.gitkeep diff --git a/packages/ember-cookies/tests/dummy/app/styles/app.css b/packages/test-app/app/styles/app.css similarity index 100% rename from packages/ember-cookies/tests/dummy/app/styles/app.css rename to packages/test-app/app/styles/app.css diff --git a/packages/ember-cookies/tests/dummy/app/templates/application.hbs b/packages/test-app/app/templates/application.hbs similarity index 100% rename from packages/ember-cookies/tests/dummy/app/templates/application.hbs rename to packages/test-app/app/templates/application.hbs diff --git a/packages/ember-cookies/tests/dummy/app/templates/components/.gitkeep b/packages/test-app/app/templates/components/.gitkeep similarity index 100% rename from packages/ember-cookies/tests/dummy/app/templates/components/.gitkeep rename to packages/test-app/app/templates/components/.gitkeep diff --git a/packages/ember-cookies/tests/dummy/app/templates/index.hbs b/packages/test-app/app/templates/index.hbs similarity index 100% rename from packages/ember-cookies/tests/dummy/app/templates/index.hbs rename to packages/test-app/app/templates/index.hbs diff --git a/packages/ember-cookies/config/ember-try.js b/packages/test-app/config/ember-try.js similarity index 98% rename from packages/ember-cookies/config/ember-try.js rename to packages/test-app/config/ember-try.js index 5cadb4bc..e82ac4ab 100644 --- a/packages/ember-cookies/config/ember-try.js +++ b/packages/test-app/config/ember-try.js @@ -21,6 +21,7 @@ module.exports = function () { devDependencies: { 'ember-data': '~3.4.0', 'ember-source': '~3.4.0', + 'ember-native-class-polyfill': '^1.0.6', }, }, }, diff --git a/packages/ember-cookies/tests/dummy/config/environment.js b/packages/test-app/config/environment.js similarity index 97% rename from packages/ember-cookies/tests/dummy/config/environment.js rename to packages/test-app/config/environment.js index 02619c9e..e9dbdf82 100644 --- a/packages/ember-cookies/tests/dummy/config/environment.js +++ b/packages/test-app/config/environment.js @@ -4,7 +4,7 @@ module.exports = function (environment) { let ENV = { - modulePrefix: 'dummy', + modulePrefix: 'test-app', environment, rootURL: '/', locationType: 'auto', diff --git a/packages/ember-cookies/tests/dummy/config/optional-features.json b/packages/test-app/config/optional-features.json similarity index 100% rename from packages/ember-cookies/tests/dummy/config/optional-features.json rename to packages/test-app/config/optional-features.json diff --git a/packages/ember-cookies/tests/dummy/config/targets.js b/packages/test-app/config/targets.js similarity index 100% rename from packages/ember-cookies/tests/dummy/config/targets.js rename to packages/test-app/config/targets.js diff --git a/packages/test-app/ember-cli-build.js b/packages/test-app/ember-cli-build.js new file mode 100644 index 00000000..379065b9 --- /dev/null +++ b/packages/test-app/ember-cli-build.js @@ -0,0 +1,11 @@ +/* eslint-env node */ +const EmberApp = require('ember-cli/lib/broccoli/ember-app'); + +module.exports = function (defaults) { + let app = new EmberApp(defaults, { + // Add options here + }); + + const { maybeEmbroider } = require('@embroider/test-setup'); + return maybeEmbroider(app); +}; diff --git a/packages/test-app/package.json b/packages/test-app/package.json new file mode 100644 index 00000000..048dbf4a --- /dev/null +++ b/packages/test-app/package.json @@ -0,0 +1,78 @@ +{ + "name": "test-app", + "version": "0.5.2", + "description": "Test app for ember-cookies addon", + "license": "MIT", + "author": "", + "directories": { + "doc": "doc", + "test": "tests" + }, + "repository": "https://github.com/simplabs/ember-cookies", + "scripts": { + "build": "ember build", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"", + "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", + "lint:js": "eslint . --cache", + "lint:js:fix": "eslint . --fix", + "nodetest": "node node-tests/runner.js", + "start": "ember server", + "test": "ember test", + "test:all": "ember try:each", + "test:one": "ember try:one" + }, + "devDependencies": { + "@babel/eslint-parser": "^7.17.0", + "@ember/optional-features": "^2.0.0", + "@ember/test-helpers": "^2.5.0", + "@embroider/test-setup": "1.6.0", + "@glimmer/component": "^1.0.4", + "@glimmer/tracking": "^1.0.4", + "broccoli-asset-rev": "^3.0.0", + "chai": "^4.1.0", + "ember-auto-import": "^2.4.0", + "ember-cli": "~4.3.0", + "ember-cli-babel": "^7.26.3", + "ember-cli-chai": "^0.5.0", + "ember-cli-dependency-checker": "^3.2.0", + "ember-cli-fastboot": "^3.2.0-beta.4", + "ember-cli-fastboot-testing": "^0.6.0", + "ember-cli-htmlbars": "^6.0.0", + "ember-cli-inject-live-reload": "^2.0.2", + "ember-cli-sri": "^2.1.1", + "ember-cli-terser": "^4.0.1", + "ember-cookies": "0.5.2", + "ember-disable-prototype-extensions": "^1.1.3", + "ember-export-application-global": "^2.0.1", + "ember-load-initializers": "^2.1.2", + "ember-maybe-import-regenerator": "^1.0.0", + "ember-page-title": "^7.0.0", + "ember-qunit": "^5.1.5", + "ember-resolver": "^8.0.2", + "ember-sinon": "5.0.0", + "ember-source": "~4.3.0", + "ember-source-channel-url": "^3.0.0", + "ember-try": "^2.0.0", + "eslint": "^8.0.0", + "eslint-config-prettier": "^8.1.0", + "eslint-plugin-ember": "^10.3.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-qunit": "^7.2.0", + "glob": "^8.0.0", + "loader.js": "^4.7.0", + "npm-run-all": "^4.1.5", + "prettier": "2.6.2", + "qunit": "^2.16.0", + "request": "^2.88.2", + "rsvp": "^4.8.5", + "symlink-or-copy": "^1.1.8", + "webpack": "^5.70.0" + }, + "engines": { + "node": ">= 12.*" + }, + "ember": { + "edition": "octane" + } +} diff --git a/packages/ember-cookies/tests/dummy/public/crossdomain.xml b/packages/test-app/public/crossdomain.xml similarity index 100% rename from packages/ember-cookies/tests/dummy/public/crossdomain.xml rename to packages/test-app/public/crossdomain.xml diff --git a/packages/ember-cookies/tests/dummy/public/robots.txt b/packages/test-app/public/robots.txt similarity index 100% rename from packages/ember-cookies/tests/dummy/public/robots.txt rename to packages/test-app/public/robots.txt diff --git a/packages/ember-cookies/testem.js b/packages/test-app/testem.js similarity index 100% rename from packages/ember-cookies/testem.js rename to packages/test-app/testem.js diff --git a/packages/ember-cookies/tests/fastboot/cookie-access-test.js b/packages/test-app/tests/fastboot/cookie-access-test.js similarity index 100% rename from packages/ember-cookies/tests/fastboot/cookie-access-test.js rename to packages/test-app/tests/fastboot/cookie-access-test.js diff --git a/packages/ember-cookies/tests/helpers/resolver.js b/packages/test-app/tests/helpers/resolver.js similarity index 100% rename from packages/ember-cookies/tests/helpers/resolver.js rename to packages/test-app/tests/helpers/resolver.js diff --git a/packages/ember-cookies/tests/index.html b/packages/test-app/tests/index.html similarity index 89% rename from packages/ember-cookies/tests/index.html rename to packages/test-app/tests/index.html index 3eb848db..fcc42a4a 100644 --- a/packages/ember-cookies/tests/index.html +++ b/packages/test-app/tests/index.html @@ -11,7 +11,7 @@ {{content-for "test-head"}} - + {{content-for "head-footer"}} @@ -31,7 +31,7 @@ - + {{content-for "body-footer"}} diff --git a/packages/ember-cookies/tests/integration/.gitkeep b/packages/test-app/tests/integration/.gitkeep similarity index 100% rename from packages/ember-cookies/tests/integration/.gitkeep rename to packages/test-app/tests/integration/.gitkeep diff --git a/packages/ember-cookies/tests/test-helper.js b/packages/test-app/tests/test-helper.js similarity index 100% rename from packages/ember-cookies/tests/test-helper.js rename to packages/test-app/tests/test-helper.js diff --git a/packages/ember-cookies/tests/unit/.gitkeep b/packages/test-app/tests/unit/.gitkeep similarity index 100% rename from packages/ember-cookies/tests/unit/.gitkeep rename to packages/test-app/tests/unit/.gitkeep diff --git a/packages/ember-cookies/tests/unit/clear-all-cookies-test.js b/packages/test-app/tests/unit/clear-all-cookies-test.js similarity index 100% rename from packages/ember-cookies/tests/unit/clear-all-cookies-test.js rename to packages/test-app/tests/unit/clear-all-cookies-test.js diff --git a/packages/ember-cookies/tests/unit/services/cookies-test.js b/packages/test-app/tests/unit/services/cookies-test.js similarity index 100% rename from packages/ember-cookies/tests/unit/services/cookies-test.js rename to packages/test-app/tests/unit/services/cookies-test.js