diff --git a/test/fixtures/input/.editorconfig b/test/fixtures/3.10/input/.editorconfig similarity index 100% rename from test/fixtures/input/.editorconfig rename to test/fixtures/3.10/input/.editorconfig diff --git a/test/fixtures/input/.ember-cli b/test/fixtures/3.10/input/.ember-cli similarity index 100% rename from test/fixtures/input/.ember-cli rename to test/fixtures/3.10/input/.ember-cli diff --git a/test/fixtures/input/.eslintignore b/test/fixtures/3.10/input/.eslintignore similarity index 100% rename from test/fixtures/input/.eslintignore rename to test/fixtures/3.10/input/.eslintignore diff --git a/test/fixtures/input/.eslintrc.js b/test/fixtures/3.10/input/.eslintrc.js similarity index 100% rename from test/fixtures/input/.eslintrc.js rename to test/fixtures/3.10/input/.eslintrc.js diff --git a/test/fixtures/input/.gitignore b/test/fixtures/3.10/input/.gitignore similarity index 100% rename from test/fixtures/input/.gitignore rename to test/fixtures/3.10/input/.gitignore diff --git a/test/fixtures/input/.template-lintrc.js b/test/fixtures/3.10/input/.template-lintrc.js similarity index 100% rename from test/fixtures/input/.template-lintrc.js rename to test/fixtures/3.10/input/.template-lintrc.js diff --git a/test/fixtures/input/.travis.yml b/test/fixtures/3.10/input/.travis.yml similarity index 100% rename from test/fixtures/input/.travis.yml rename to test/fixtures/3.10/input/.travis.yml diff --git a/test/fixtures/input/.watchmanconfig b/test/fixtures/3.10/input/.watchmanconfig similarity index 100% rename from test/fixtures/input/.watchmanconfig rename to test/fixtures/3.10/input/.watchmanconfig diff --git a/test/fixtures/input/README.md b/test/fixtures/3.10/input/README.md similarity index 100% rename from test/fixtures/input/README.md rename to test/fixtures/3.10/input/README.md diff --git a/test/fixtures/input/app/app.js b/test/fixtures/3.10/input/app/app.js similarity index 100% rename from test/fixtures/input/app/app.js rename to test/fixtures/3.10/input/app/app.js diff --git a/test/fixtures/input/app/components/.gitkeep b/test/fixtures/3.10/input/app/components/.gitkeep similarity index 100% rename from test/fixtures/input/app/components/.gitkeep rename to test/fixtures/3.10/input/app/components/.gitkeep diff --git a/test/fixtures/input/app/controllers/.gitkeep b/test/fixtures/3.10/input/app/controllers/.gitkeep similarity index 100% rename from test/fixtures/input/app/controllers/.gitkeep rename to test/fixtures/3.10/input/app/controllers/.gitkeep diff --git a/test/fixtures/input/app/helpers/.gitkeep b/test/fixtures/3.10/input/app/helpers/.gitkeep similarity index 100% rename from test/fixtures/input/app/helpers/.gitkeep rename to test/fixtures/3.10/input/app/helpers/.gitkeep diff --git a/test/fixtures/input/app/index.html b/test/fixtures/3.10/input/app/index.html similarity index 100% rename from test/fixtures/input/app/index.html rename to test/fixtures/3.10/input/app/index.html diff --git a/test/fixtures/input/app/models/.gitkeep b/test/fixtures/3.10/input/app/models/.gitkeep similarity index 100% rename from test/fixtures/input/app/models/.gitkeep rename to test/fixtures/3.10/input/app/models/.gitkeep diff --git a/test/fixtures/input/app/resolver.js b/test/fixtures/3.10/input/app/resolver.js similarity index 100% rename from test/fixtures/input/app/resolver.js rename to test/fixtures/3.10/input/app/resolver.js diff --git a/test/fixtures/input/app/router.js b/test/fixtures/3.10/input/app/router.js similarity index 100% rename from test/fixtures/input/app/router.js rename to test/fixtures/3.10/input/app/router.js diff --git a/test/fixtures/input/app/routes/.gitkeep b/test/fixtures/3.10/input/app/routes/.gitkeep similarity index 100% rename from test/fixtures/input/app/routes/.gitkeep rename to test/fixtures/3.10/input/app/routes/.gitkeep diff --git a/test/fixtures/input/app/styles/app.css b/test/fixtures/3.10/input/app/styles/app.css similarity index 100% rename from test/fixtures/input/app/styles/app.css rename to test/fixtures/3.10/input/app/styles/app.css diff --git a/test/fixtures/input/app/templates/application.hbs b/test/fixtures/3.10/input/app/templates/application.hbs similarity index 100% rename from test/fixtures/input/app/templates/application.hbs rename to test/fixtures/3.10/input/app/templates/application.hbs diff --git a/test/fixtures/input/app/templates/components/.gitkeep b/test/fixtures/3.10/input/app/templates/components/.gitkeep similarity index 100% rename from test/fixtures/input/app/templates/components/.gitkeep rename to test/fixtures/3.10/input/app/templates/components/.gitkeep diff --git a/test/fixtures/input/config/environment.js b/test/fixtures/3.10/input/config/environment.js similarity index 100% rename from test/fixtures/input/config/environment.js rename to test/fixtures/3.10/input/config/environment.js diff --git a/test/fixtures/input/config/optional-features.json b/test/fixtures/3.10/input/config/optional-features.json similarity index 100% rename from test/fixtures/input/config/optional-features.json rename to test/fixtures/3.10/input/config/optional-features.json diff --git a/test/fixtures/input/config/targets.js b/test/fixtures/3.10/input/config/targets.js similarity index 100% rename from test/fixtures/input/config/targets.js rename to test/fixtures/3.10/input/config/targets.js diff --git a/test/fixtures/input/ember-cli-build.js b/test/fixtures/3.10/input/ember-cli-build.js similarity index 100% rename from test/fixtures/input/ember-cli-build.js rename to test/fixtures/3.10/input/ember-cli-build.js diff --git a/test/fixtures/input/package-lock.json b/test/fixtures/3.10/input/package-lock.json similarity index 100% rename from test/fixtures/input/package-lock.json rename to test/fixtures/3.10/input/package-lock.json diff --git a/test/fixtures/input/package.json b/test/fixtures/3.10/input/package.json similarity index 100% rename from test/fixtures/input/package.json rename to test/fixtures/3.10/input/package.json diff --git a/test/fixtures/input/public/robots.txt b/test/fixtures/3.10/input/public/robots.txt similarity index 100% rename from test/fixtures/input/public/robots.txt rename to test/fixtures/3.10/input/public/robots.txt diff --git a/test/fixtures/input/testem.js b/test/fixtures/3.10/input/testem.js similarity index 100% rename from test/fixtures/input/testem.js rename to test/fixtures/3.10/input/testem.js diff --git a/test/fixtures/input/tests/helpers/.gitkeep b/test/fixtures/3.10/input/tests/helpers/.gitkeep similarity index 100% rename from test/fixtures/input/tests/helpers/.gitkeep rename to test/fixtures/3.10/input/tests/helpers/.gitkeep diff --git a/test/fixtures/input/tests/index.html b/test/fixtures/3.10/input/tests/index.html similarity index 100% rename from test/fixtures/input/tests/index.html rename to test/fixtures/3.10/input/tests/index.html diff --git a/test/fixtures/input/tests/integration/.gitkeep b/test/fixtures/3.10/input/tests/integration/.gitkeep similarity index 100% rename from test/fixtures/input/tests/integration/.gitkeep rename to test/fixtures/3.10/input/tests/integration/.gitkeep diff --git a/test/fixtures/input/tests/test-helper.js b/test/fixtures/3.10/input/tests/test-helper.js similarity index 100% rename from test/fixtures/input/tests/test-helper.js rename to test/fixtures/3.10/input/tests/test-helper.js diff --git a/test/fixtures/input/tests/unit/.gitkeep b/test/fixtures/3.10/input/tests/unit/.gitkeep similarity index 100% rename from test/fixtures/input/tests/unit/.gitkeep rename to test/fixtures/3.10/input/tests/unit/.gitkeep diff --git a/test/fixtures/input/vendor/.gitkeep b/test/fixtures/3.10/input/vendor/.gitkeep similarity index 100% rename from test/fixtures/input/vendor/.gitkeep rename to test/fixtures/3.10/input/vendor/.gitkeep diff --git a/test/fixtures/output/.editorconfig b/test/fixtures/3.10/output/.editorconfig similarity index 100% rename from test/fixtures/output/.editorconfig rename to test/fixtures/3.10/output/.editorconfig diff --git a/test/fixtures/output/.ember-cli b/test/fixtures/3.10/output/.ember-cli similarity index 100% rename from test/fixtures/output/.ember-cli rename to test/fixtures/3.10/output/.ember-cli diff --git a/test/fixtures/output/.eslintignore b/test/fixtures/3.10/output/.eslintignore similarity index 100% rename from test/fixtures/output/.eslintignore rename to test/fixtures/3.10/output/.eslintignore diff --git a/test/fixtures/output/.eslintrc.js b/test/fixtures/3.10/output/.eslintrc.js similarity index 100% rename from test/fixtures/output/.eslintrc.js rename to test/fixtures/3.10/output/.eslintrc.js diff --git a/test/fixtures/output/.gitignore b/test/fixtures/3.10/output/.gitignore similarity index 100% rename from test/fixtures/output/.gitignore rename to test/fixtures/3.10/output/.gitignore diff --git a/test/fixtures/output/.template-lintrc.js b/test/fixtures/3.10/output/.template-lintrc.js similarity index 100% rename from test/fixtures/output/.template-lintrc.js rename to test/fixtures/3.10/output/.template-lintrc.js diff --git a/test/fixtures/output/.travis.yml b/test/fixtures/3.10/output/.travis.yml similarity index 100% rename from test/fixtures/output/.travis.yml rename to test/fixtures/3.10/output/.travis.yml diff --git a/test/fixtures/output/.watchmanconfig b/test/fixtures/3.10/output/.watchmanconfig similarity index 100% rename from test/fixtures/output/.watchmanconfig rename to test/fixtures/3.10/output/.watchmanconfig diff --git a/test/fixtures/output/README.md b/test/fixtures/3.10/output/README.md similarity index 100% rename from test/fixtures/output/README.md rename to test/fixtures/3.10/output/README.md diff --git a/test/fixtures/output/app/app.js b/test/fixtures/3.10/output/app/app.js similarity index 100% rename from test/fixtures/output/app/app.js rename to test/fixtures/3.10/output/app/app.js diff --git a/test/fixtures/output/app/components/.gitkeep b/test/fixtures/3.10/output/app/components/.gitkeep similarity index 100% rename from test/fixtures/output/app/components/.gitkeep rename to test/fixtures/3.10/output/app/components/.gitkeep diff --git a/test/fixtures/output/app/controllers/.gitkeep b/test/fixtures/3.10/output/app/controllers/.gitkeep similarity index 100% rename from test/fixtures/output/app/controllers/.gitkeep rename to test/fixtures/3.10/output/app/controllers/.gitkeep diff --git a/test/fixtures/output/app/helpers/.gitkeep b/test/fixtures/3.10/output/app/helpers/.gitkeep similarity index 100% rename from test/fixtures/output/app/helpers/.gitkeep rename to test/fixtures/3.10/output/app/helpers/.gitkeep diff --git a/test/fixtures/output/app/index.html b/test/fixtures/3.10/output/app/index.html similarity index 100% rename from test/fixtures/output/app/index.html rename to test/fixtures/3.10/output/app/index.html diff --git a/test/fixtures/output/app/models/.gitkeep b/test/fixtures/3.10/output/app/models/.gitkeep similarity index 100% rename from test/fixtures/output/app/models/.gitkeep rename to test/fixtures/3.10/output/app/models/.gitkeep diff --git a/test/fixtures/output/app/resolver.js b/test/fixtures/3.10/output/app/resolver.js similarity index 100% rename from test/fixtures/output/app/resolver.js rename to test/fixtures/3.10/output/app/resolver.js diff --git a/test/fixtures/output/app/router.js b/test/fixtures/3.10/output/app/router.js similarity index 100% rename from test/fixtures/output/app/router.js rename to test/fixtures/3.10/output/app/router.js diff --git a/test/fixtures/output/app/routes/.gitkeep b/test/fixtures/3.10/output/app/routes/.gitkeep similarity index 100% rename from test/fixtures/output/app/routes/.gitkeep rename to test/fixtures/3.10/output/app/routes/.gitkeep diff --git a/test/fixtures/output/app/styles/app.css b/test/fixtures/3.10/output/app/styles/app.css similarity index 100% rename from test/fixtures/output/app/styles/app.css rename to test/fixtures/3.10/output/app/styles/app.css diff --git a/test/fixtures/output/app/templates/application.hbs b/test/fixtures/3.10/output/app/templates/application.hbs similarity index 100% rename from test/fixtures/output/app/templates/application.hbs rename to test/fixtures/3.10/output/app/templates/application.hbs diff --git a/test/fixtures/output/app/templates/components/.gitkeep b/test/fixtures/3.10/output/app/templates/components/.gitkeep similarity index 100% rename from test/fixtures/output/app/templates/components/.gitkeep rename to test/fixtures/3.10/output/app/templates/components/.gitkeep diff --git a/test/fixtures/output/config/environment.js b/test/fixtures/3.10/output/config/environment.js similarity index 100% rename from test/fixtures/output/config/environment.js rename to test/fixtures/3.10/output/config/environment.js diff --git a/test/fixtures/output/config/optional-features.json b/test/fixtures/3.10/output/config/optional-features.json similarity index 100% rename from test/fixtures/output/config/optional-features.json rename to test/fixtures/3.10/output/config/optional-features.json diff --git a/test/fixtures/output/config/targets.js b/test/fixtures/3.10/output/config/targets.js similarity index 100% rename from test/fixtures/output/config/targets.js rename to test/fixtures/3.10/output/config/targets.js diff --git a/test/fixtures/output/ember-cli-build.js b/test/fixtures/3.10/output/ember-cli-build.js similarity index 100% rename from test/fixtures/output/ember-cli-build.js rename to test/fixtures/3.10/output/ember-cli-build.js diff --git a/test/fixtures/output/package-lock.json b/test/fixtures/3.10/output/package-lock.json similarity index 100% rename from test/fixtures/output/package-lock.json rename to test/fixtures/3.10/output/package-lock.json diff --git a/test/fixtures/output/package.json b/test/fixtures/3.10/output/package.json similarity index 100% rename from test/fixtures/output/package.json rename to test/fixtures/3.10/output/package.json diff --git a/test/fixtures/output/public/robots.txt b/test/fixtures/3.10/output/public/robots.txt similarity index 100% rename from test/fixtures/output/public/robots.txt rename to test/fixtures/3.10/output/public/robots.txt diff --git a/test/fixtures/output/testem.js b/test/fixtures/3.10/output/testem.js similarity index 100% rename from test/fixtures/output/testem.js rename to test/fixtures/3.10/output/testem.js diff --git a/test/fixtures/output/tests/helpers/.gitkeep b/test/fixtures/3.10/output/tests/helpers/.gitkeep similarity index 100% rename from test/fixtures/output/tests/helpers/.gitkeep rename to test/fixtures/3.10/output/tests/helpers/.gitkeep diff --git a/test/fixtures/output/tests/index.html b/test/fixtures/3.10/output/tests/index.html similarity index 100% rename from test/fixtures/output/tests/index.html rename to test/fixtures/3.10/output/tests/index.html diff --git a/test/fixtures/output/tests/integration/.gitkeep b/test/fixtures/3.10/output/tests/integration/.gitkeep similarity index 100% rename from test/fixtures/output/tests/integration/.gitkeep rename to test/fixtures/3.10/output/tests/integration/.gitkeep diff --git a/test/fixtures/output/tests/test-helper.js b/test/fixtures/3.10/output/tests/test-helper.js similarity index 100% rename from test/fixtures/output/tests/test-helper.js rename to test/fixtures/3.10/output/tests/test-helper.js diff --git a/test/fixtures/output/tests/unit/.gitkeep b/test/fixtures/3.10/output/tests/unit/.gitkeep similarity index 100% rename from test/fixtures/output/tests/unit/.gitkeep rename to test/fixtures/3.10/output/tests/unit/.gitkeep diff --git a/test/fixtures/output/vendor/.gitkeep b/test/fixtures/3.10/output/vendor/.gitkeep similarity index 100% rename from test/fixtures/output/vendor/.gitkeep rename to test/fixtures/3.10/output/vendor/.gitkeep diff --git a/test/run-test.js b/test/run-test.js index 0eeec7ba..a04a1f15 100644 --- a/test/run-test.js +++ b/test/run-test.js @@ -1,14 +1,19 @@ /* eslint-disable no-console */ +const versions = ['3.10', '3.13']; const { spawn } = require('child_process'); const execa = require('execa'); const path = require('path'); -// resolved from the root of the project -const inputDir = path.resolve('./test/fixtures/input'); -const execOpts = { cwd: inputDir, stderr: 'inherit' }; +async function runTestForVersion(version) { + console.log(` + Running Integration Test for Ember ${version} + `); + + // resolved from the root of the project + const inputDir = path.resolve(`./test/fixtures/${version}/input`); + const execOpts = { cwd: inputDir, stderr: 'inherit' }; -(async () => { console.log('installing deps'); await execa('rm', ['-rf', 'node_modules'], execOpts); @@ -48,5 +53,15 @@ const execOpts = { cwd: inputDir, stderr: 'inherit' }; } console.log('codemod ran successfully! 🎉'); +} + + +(async () => { + for (let version of versions) { + await runTestForVersion(version); + } + process.exit(0); })(); + +