I've setup a model that I would like to unit test in Ember but every time I run the test suite, no matter what I do, I get 0 tests ran.
$ ember test
version: 1.13.1
Built project successfully. Stored in "/Users/BenAMorgan/Sites/frontend/tmp/class-tests_dist-pjaTeNtp.tmp".
1..0
# tests 0
# pass 0
# fail 0
# ok
No tests were run, please check whether any errors occurred in the page (ember test --server) and ensure that you have a test launcher (e.g. PhantomJS) enabled.
The model:
// app/models/feature.js
import DS from 'ember-data';
export default DS.Model.extend({
title: DS.attr('string'),
description: DS.attr('string')
});
What the test looks like:
// tests/unit/models/feature-test.js
import { moduleForModel, test } from 'ember-qunit';
moduleForModel('feature', 'Unit | Model | feature', {
// Specify the other units that are required for this test.
needs: []
});
test('it exists', function(assert) {
var model = this.subject();
// var store = this.store();
assert.ok(!!model);
});
All the npm dependencies installed without errors. Testem is installed. PhantomJS is installed via npm. Not sure where I'm going wrong.
Aucun commentaire:
Enregistrer un commentaire