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

Add qunit ES6 shim. #132

Merged
merged 1 commit into from
Feb 7, 2015
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
4 changes: 3 additions & 1 deletion lib/ember-qunit/qunit-module.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { module as qunitModule } from 'qunit';

function normalizeCallbacks(callbacks) {
if (typeof callbacks !== 'object') { return; }
if (!callbacks) { return; }
Expand All @@ -18,7 +20,7 @@ export function createModule(Constructor, name, description, callbacks) {

var module = new Constructor(name, description, callbacks);

QUnit.module(module.name, {
qunitModule(module.name, {
setup: function() {
module.setup();
},
Expand Down
3 changes: 2 additions & 1 deletion lib/ember-qunit/test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Ember from 'ember';
import { getContext } from 'ember-test-helpers';
import { test as qunitTest } from 'qunit';

function resetViews() {
Ember.View.views = {};
Expand All @@ -22,5 +23,5 @@ export default function test(testName, callback) {
});
}

QUnit.test(testName, wrapper);
qunitTest(testName, wrapper);
}
4 changes: 4 additions & 0 deletions lib/qunit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* globals test:true */

export var module = QUnit.module;
export var test = QUnit.test;
10 changes: 10 additions & 0 deletions tests/qunit-shim-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {
module,
test
} from 'qunit';

module('qunit-shim test');

test('should work!', function(assert) {
assert.ok('shims should function properly');
});