Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert stage-1 tests to test-scenarios #980

Merged
merged 1 commit into from
Sep 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
489 changes: 0 additions & 489 deletions packages/compat/tests/stage1.test.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { name: 'in-repo-addon' };
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "in-repo-addon",
"keywords": ["ember-addon"]
}
21 changes: 21 additions & 0 deletions tests/fixtures/blacklisted-addon-build-options/ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use strict';

const EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function (defaults) {
let app = new EmberApp(defaults, {
// Add options here
addons: {
blacklist: ['blacklisted-in-repo-addon'],
},
});

const { Webpack } = require('@embroider/webpack');
return require('@embroider/compat').compatBuild(app, Webpack, {
skipBabel: [
{
package: 'qunit',
},
],
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
name: require('./package').name,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "blacklisted-in-repo-addon",
"keywords": ["ember-addon"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
name: require('./package').name,
isEnabled() {
return false;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "disabled-in-repo-addon",
"keywords": ["ember-addon"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function () {
return import('some-library');
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import Component from '@ember/component';
import { hbs } from 'ember-cli-htmlbars';
export default Component.extend({
// tagged template form:
layout: hbs`<div class={{embroider-sample-transforms-target}}>Inline</div><span>{{macroDependencySatisfies 'ember-source' '>3'}}</span>`,
// call expression form:
extra: hbs('<div class={{embroider-sample-transforms-target}}>Extra</div>'),
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import Component from '@ember/component';
import layout from '../templates/components/hello-world';
import { getOwnConfig } from '@embroider/macros';
export default Component.extend({
message: 'embroider-sample-transforms-target',
config: getOwnConfig(),
layout,
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<div class={{embroider-sample-transforms-target}}>hello world</div>
<span>{{macroDependencySatisfies "ember-source" ">3"}}</span>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class={{embroider-sample-transforms-module}}>hello world</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from 'my-addon/components/hello-world';
8 changes: 8 additions & 0 deletions tests/fixtures/hello-world-addon/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
name: require('./package').name,
options: {
babel: {
plugins: [require.resolve('ember-auto-import/babel-plugin')],
},
},
};
3 changes: 3 additions & 0 deletions tests/scenarios/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"jsdom": "^16.2.2",
"lodash": "^4.17.20",
"qunit": "^2.16.0",
"resolve": "^1.20.0",
"scenario-tester": "^2.0.1",
"ts-node": "^9.1.1"
},
Expand All @@ -30,6 +31,8 @@
"ember-cli-3.20": "npm:ember-cli@~3.20.0",
"ember-cli-3.24": "npm:ember-cli@~3.24.0",
"ember-cli-beta": "npm:ember-cli@beta",
"ember-cli-htmlbars-inline-precompile": "^2.1.0",
"ember-cli-htmlbars-3": "npm:ember-cli-htmlbars@3",
"ember-cli-latest": "npm:ember-cli@latest",
"ember-cli-fastboot": "^2.2.3",
"ember-composable-helpers": "^4.4.1",
Expand Down
Loading