Browse Source

delet

master
yuriy0803 2 years ago
parent
commit
508b025f3d
  1. 52
      www/tests/.jshintrc
  2. 5
      www/tests/helpers/destroy-app.js
  3. 23
      www/tests/helpers/module-for-acceptance.js
  4. 11
      www/tests/helpers/resolver.js
  5. 18
      www/tests/helpers/start-app.js
  6. 33
      www/tests/index.html
  7. 0
      www/tests/integration/.gitkeep
  8. 6
      www/tests/test-helper.js
  9. 0
      www/tests/unit/.gitkeep
  10. 12
      www/tests/unit/adapters/application-test.js
  11. 15
      www/tests/unit/serializers/chart-test.js
  12. 20
      www/tests/units/charts/difficulty-test.js

52
www/tests/.jshintrc

@ -1,52 +0,0 @@
{
"predef": [
"document",
"window",
"location",
"setTimeout",
"$",
"-Promise",
"define",
"console",
"visit",
"exists",
"fillIn",
"click",
"keyEvent",
"triggerEvent",
"find",
"findWithAssert",
"wait",
"DS",
"andThen",
"currentURL",
"currentPath",
"currentRouteName"
],
"node": false,
"browser": false,
"boss": true,
"curly": true,
"debug": false,
"devel": false,
"eqeqeq": true,
"evil": true,
"forin": false,
"immed": false,
"laxbreak": false,
"newcap": true,
"noarg": true,
"noempty": false,
"nonew": false,
"nomen": false,
"onevar": false,
"plusplus": false,
"regexp": false,
"undef": true,
"sub": true,
"strict": false,
"white": false,
"eqnull": true,
"esversion": 6,
"unused": true
}

5
www/tests/helpers/destroy-app.js

@ -1,5 +0,0 @@
import Ember from 'ember';
export default function destroyApp(application) {
Ember.run(application, 'destroy');
}

23
www/tests/helpers/module-for-acceptance.js

@ -1,23 +0,0 @@
import { module } from 'qunit';
import Ember from 'ember';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';
const { RSVP: { Promise } } = Ember;
export default function(name, options = {}) {
module(name, {
beforeEach() {
this.application = startApp();
if (options.beforeEach) {
return options.beforeEach.apply(this, arguments);
}
},
afterEach() {
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
return Promise.resolve(afterEach).then(() => destroyApp(this.application));
}
});
}

11
www/tests/helpers/resolver.js

@ -1,11 +0,0 @@
import Resolver from '../../resolver';
import config from '../../config/environment';
const resolver = Resolver.create();
resolver.namespace = {
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix
};
export default resolver;

18
www/tests/helpers/start-app.js

@ -1,18 +0,0 @@
import Ember from 'ember';
import Application from '../../app';
import config from '../../config/environment';
export default function startApp(attrs) {
let application;
let attributes = Ember.merge({}, config.APP);
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
Ember.run(() => {
application = Application.create(attributes);
application.setupForTesting();
application.injectTestHelpers();
});
return application;
}

33
www/tests/index.html

@ -1,33 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Pool Tests</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{content-for "head"}}
{{content-for "test-head"}}
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link rel="stylesheet" href="{{rootURL}}assets/pool.css">
<link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
{{content-for "head-footer"}}
{{content-for "test-head-footer"}}
</head>
<body>
{{content-for "body"}}
{{content-for "test-body"}}
<script src="/testem.js" integrity=""></script>
<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/test-support.js"></script>
<script src="{{rootURL}}assets/pool.js"></script>
<script src="{{rootURL}}assets/tests.js"></script>
{{content-for "body-footer"}}
{{content-for "test-body-footer"}}
</body>
</html>

0
www/tests/integration/.gitkeep

6
www/tests/test-helper.js

@ -1,6 +0,0 @@
import resolver from './helpers/resolver';
import {
setResolver
} from 'ember-qunit';
setResolver(resolver);

0
www/tests/unit/.gitkeep

12
www/tests/unit/adapters/application-test.js

@ -1,12 +0,0 @@
import { moduleFor, test } from 'ember-qunit';
moduleFor('adapter:application', 'Unit | Adapter | application', {
// Specify the other units that are required for this test.
// needs: ['serializer:foo']
});
// Replace this with your real tests.
test('it exists', function(assert) {
let adapter = this.subject();
assert.ok(adapter);
});

15
www/tests/unit/serializers/chart-test.js

@ -1,15 +0,0 @@
import { moduleForModel, test } from 'ember-qunit';
moduleForModel('chart', 'Unit | Serializer | chart', {
// Specify the other units that are required for this test.
needs: ['serializer:chart']
});
// Replace this with your real tests.
test('it serializes records', function(assert) {
let record = this.subject();
let serializedRecord = record.serialize();
assert.ok(serializedRecord);
});

20
www/tests/units/charts/difficulty-test.js

@ -1,20 +0,0 @@
import {
moduleForComponent,
test
} from 'ember-qunit';
moduleForComponent('difficulty', 'difficulty', {
needs: [ 'component:high-charts' ]
});
test('it renders', function(assert) {
assert.expect(2);
// creates the component instance
let component = this.subject();
assert.equal(component._state, 'preRender');
// appends the component to the page
this.render(assert);
assert.equal(component._state, 'inDOM');
});
Loading…
Cancel
Save