Skip to content

Commit

Permalink
Merge pull request #15157 from locks/restore-test-scope
Browse files Browse the repository at this point in the history
Ensure QUnit.test callbacks have proper scope
  • Loading branch information
rwjblue authored Apr 21, 2017
2 parents 21c22ef + 73d03e2 commit f44f1d5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/internal-test-helpers/lib/test-groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ export function testBoth(testname, callback) {
function aget(x, y) { return x[y]; }
function aset(x, y, z) { return (x[y] = z); }

QUnit.test(`${testname} using getFromEmberMetal()/Ember.set()`, () => {
QUnit.test(`${testname} using getFromEmberMetal()/Ember.set()`, function() {
callback(emberget, emberset);
});

QUnit.test(`${testname} using accessors`, () => {
QUnit.test(`${testname} using accessors`, function() {
if (ENV.USES_ACCESSORS) {
callback(aget, aset);
} else {
Expand All @@ -33,23 +33,23 @@ export function testWithDefault(testname, callback) {
function aget(x, y) { return x[y]; }
function aset(x, y, z) { return (x[y] = z); }

QUnit.test(`${testname} using obj.get()`, () => {
QUnit.test(`${testname} using obj.get()`, function() {
callback(emberget, emberset);
});

QUnit.test(`${testname} using obj.getWithDefault()`, () => {
QUnit.test(`${testname} using obj.getWithDefault()`, function() {
callback(getwithdefault, emberset);
});

QUnit.test(`${testname} using getFromEmberMetal()`, () => {
QUnit.test(`${testname} using getFromEmberMetal()`, function() {
callback(emberget, emberset);
});

QUnit.test(`${testname} using Ember.getWithDefault()`, () => {
QUnit.test(`${testname} using Ember.getWithDefault()`, function() {
callback(embergetwithdefault, emberset);
});

QUnit.test(`${testname} using accessors`, () => {
QUnit.test(`${testname} using accessors`, function() {
if (ENV.USES_ACCESSORS) {
callback(aget, aset);
} else {
Expand Down

0 comments on commit f44f1d5

Please sign in to comment.