Skip to content

Commit 52549f7

Browse files
committed
Update mocha test to use latest Ember.js and Ember Data
1 parent eefec37 commit 52549f7

File tree

8 files changed

+42
-32
lines changed

8 files changed

+42
-32
lines changed

packages/ember-cli-fastboot/test/fastboot-config-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ describe('FastBoot config', function () {
1717
return app
1818
.create('fastboot-config', {
1919
skipNpm: true,
20-
emberVersion: '3.28.6',
21-
emberDataVersion: '~3.19.0',
20+
emberVersion: 'latest',
21+
emberDataVersion: 'latest',
2222
})
2323
.then(function () {
2424
app.editPackageJSON((pkg) => {

packages/ember-cli-fastboot/test/fastboot-location-config-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ describe('FastBootLocation Configuration', function () {
1717
return app
1818
.create('fastboot-location-config', {
1919
skipNpm: true,
20-
emberVersion: '3.28.6',
21-
emberDataVersion: '~3.19.0',
20+
emberVersion: 'latest',
21+
emberDataVersion: 'latest',
2222
})
2323
.then(function () {
2424
app.editPackageJSON((pkg) => {

packages/ember-cli-fastboot/test/fastboot-location-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ describe('FastBootLocation', function () {
1616
return app
1717
.create('fastboot-location', {
1818
skipNpm: true,
19-
emberVersion: '3.28.6',
20-
emberDataVersion: '~3.19.0',
19+
emberVersion: 'latest',
20+
emberDataVersion: 'latest',
2121
})
2222
.then(function () {
2323
app.editPackageJSON((pkg) => {

packages/ember-cli-fastboot/test/fixtures/fastboot-config/config/environment.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
/* jshint node: true */
2+
'use strict';
23

3-
module.exports = function(environment) {
4-
var ENV = {
4+
module.exports = function (environment) {
5+
let ENV = {
56
modulePrefix: 'fastboot-config',
6-
environment: environment,
7-
baseURL: '/',
7+
environment,
8+
rootURL: '/',
89
locationType: 'auto',
910
EmberENV: {
1011
FEATURES: {
1112
// Here you can enable experimental features on an ember canary build
12-
// e.g. 'with-controller': true
13-
}
13+
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
14+
},
15+
EXTEND_PROTOTYPES: {
16+
// Prevent Ember Data from overriding Date.parse.
17+
Date: false,
18+
},
1419
},
1520

1621
APP: {
@@ -19,8 +24,8 @@ module.exports = function(environment) {
1924
},
2025

2126
fastboot: {
22-
hostWhitelist: ['example.com', 'subdomain.example.com', /localhost:\d+/]
23-
}
27+
hostWhitelist: ['example.com', 'subdomain.example.com', /localhost:\d+/],
28+
},
2429
};
2530

2631
if (environment === 'development') {
@@ -33,18 +38,18 @@ module.exports = function(environment) {
3338

3439
if (environment === 'test') {
3540
// Testem prefers this...
36-
ENV.baseURL = '/';
3741
ENV.locationType = 'none';
3842

3943
// keep test console output quieter
4044
ENV.APP.LOG_ACTIVE_GENERATION = false;
4145
ENV.APP.LOG_VIEW_LOOKUPS = false;
4246

4347
ENV.APP.rootElement = '#ember-testing';
48+
ENV.APP.autoboot = false;
4449
}
4550

4651
if (environment === 'production') {
47-
52+
// here you can enable a production-specific feature
4853
}
4954

5055
return ENV;

packages/ember-cli-fastboot/test/fixtures/request/config/environment.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
/* jshint node: true */
2+
'use strict';
23

3-
module.exports = function(environment) {
4-
var ENV = {
4+
module.exports = function (environment) {
5+
let ENV = {
56
modulePrefix: 'request',
6-
environment: environment,
7-
baseURL: '/',
7+
environment,
8+
rootURL: '/',
89
locationType: 'auto',
910
EmberENV: {
1011
FEATURES: {
1112
// Here you can enable experimental features on an ember canary build
12-
// e.g. 'with-controller': true
13-
}
13+
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
14+
},
15+
EXTEND_PROTOTYPES: {
16+
// Prevent Ember Data from overriding Date.parse.
17+
Date: false,
18+
},
1419
},
1520

1621
APP: {
@@ -19,8 +24,8 @@ module.exports = function(environment) {
1924
},
2025

2126
fastboot: {
22-
hostWhitelist: ['example.com', 'subdomain.example.com', /localhost:\d+/]
23-
}
27+
hostWhitelist: ['example.com', 'subdomain.example.com', /localhost:\d+/],
28+
},
2429
};
2530

2631
if (environment === 'development') {
@@ -33,18 +38,18 @@ module.exports = function(environment) {
3338

3439
if (environment === 'test') {
3540
// Testem prefers this...
36-
ENV.baseURL = '/';
3741
ENV.locationType = 'none';
3842

3943
// keep test console output quieter
4044
ENV.APP.LOG_ACTIVE_GENERATION = false;
4145
ENV.APP.LOG_VIEW_LOOKUPS = false;
4246

4347
ENV.APP.rootElement = '#ember-testing';
48+
ENV.APP.autoboot = false;
4449
}
4550

4651
if (environment === 'production') {
47-
52+
// here you can enable a production-specific feature
4853
}
4954

5055
return ENV;

packages/ember-cli-fastboot/test/package-json-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ describe('generating package.json', function () {
1919
return customApp
2020
.create('customized-outputpaths', {
2121
skipNpm: true,
22-
emberVersion: '3.28.6',
23-
emberDataVersion: '~3.19.0',
22+
emberVersion: 'latest',
23+
emberDataVersion: 'latest',
2424
})
2525
.then(function () {
2626
customApp.editPackageJSON((pkg) => {

packages/ember-cli-fastboot/test/request-details-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ describe('request details', function () {
3232
return app
3333
.create('request', {
3434
skipNpm: true,
35-
emberVersion: '3.28.6',
36-
emberDataVersion: '~3.19.0',
35+
emberVersion: 'latest',
36+
emberDataVersion: 'latest',
3737
})
3838
.then(() => injectMiddlewareAddon(app))
3939
.then(function () {

packages/ember-cli-fastboot/test/root-url-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ describe('rootUrl acceptance', function () {
1717
return app
1818
.create('root-url', {
1919
skipNpm: true,
20-
emberVersion: '3.28.6',
21-
emberDataVersion: '~3.19.0',
20+
emberVersion: 'latest',
21+
emberDataVersion: 'latest',
2222
})
2323
.then(function () {
2424
app.editPackageJSON((pkg) => {

0 commit comments

Comments
 (0)