1
0
mirror of https://github.com/lrsjng/h5ai.git synced 2025-08-23 22:13:02 +02:00

Add tests.

This commit is contained in:
Lars Jung
2015-04-22 23:21:48 +02:00
parent 3882f1483b
commit 88854ad451
23 changed files with 171 additions and 38 deletions

View File

@@ -4,7 +4,7 @@
var ID = 'core/event';
var DEPS = ['_'];
describe('module "' + ID + '"', function () {
describe('module \'' + ID + '\'', function () {
before(function () {

View File

@@ -4,7 +4,7 @@
var ID = 'core/format';
var DEPS = ['_'];
describe('module "' + ID + '"', function () {
describe('module \'' + ID + '\'', function () {
before(function () {
@@ -112,7 +112,7 @@ describe('module "' + ID + '"', function () {
var arg = data[0];
var exp = data[1];
it('.formatSize(' + arg + ') => "' + exp + '"', function () {
it('.formatSize(' + arg + ') => \'' + exp + '\'', function () {
var instance = this.applyFn();
instance.setDefaultMetric(false);
@@ -148,7 +148,7 @@ describe('module "' + ID + '"', function () {
var arg = data[0];
var exp = data[1];
it('.formatSize(' + arg + ') => "' + exp + '"', function () {
it('.formatSize(' + arg + ') => \'' + exp + '\'', function () {
var instance = this.applyFn();
instance.setDefaultMetric(true);
@@ -209,7 +209,7 @@ describe('module "' + ID + '"', function () {
var arg2 = data[1];
var exp = data[2];
it('.formatDate(' + arg1 + ', ' + arg2 + ') => "' + exp + '"', function () {
it('.formatDate(' + arg1 + ', \'' + arg2 + '\') => \'' + exp + '\'', function () {
var instance = this.applyFn();
assert.strictEqual(instance.formatDate(arg1, arg2), exp);

View File

@@ -4,7 +4,7 @@
var ID = 'core/langs';
var DEPS = ['_', 'config'];
describe('module "' + ID + '"', function () {
describe('module \'' + ID + '\'', function () {
before(function () {

View File

@@ -4,7 +4,7 @@
var ID = 'core/location';
var DEPS = ['_', 'modernizr', 'core/event', 'core/notify', 'core/settings'];
describe('module "' + ID + '"', function () {
describe('module \'' + ID + '\'', function () {
before(function () {
@@ -111,7 +111,7 @@ describe('module "' + ID + '"', function () {
var arg = data[0];
var exp = data[1];
it('.forceEncoding("' + arg + '") => "' + exp + '"', function () {
it('.forceEncoding(\'' + arg + '\') => \'' + exp + '\'', function () {
var instance = this.applyFn();
assert.strictEqual(instance.forceEncoding(arg), exp);
@@ -199,7 +199,7 @@ describe('module "' + ID + '"', function () {
assert.strictEqual($el.attr('href'), item.absHref);
});
it('sets target="_blank" for unmanaged folders', function () {
it('sets target=\'_blank\' for unmanaged folders', function () {
this.xSettings.unmanagedInNewWindow = true;
@@ -216,7 +216,7 @@ describe('module "' + ID + '"', function () {
assert.strictEqual($el.attr('target'), '_blank');
});
it('does not set target="_blank" for managed folders', function () {
it('does not set target=\'_blank\' for managed folders', function () {
this.xSettings.unmanagedInNewWindow = true;
@@ -233,7 +233,7 @@ describe('module "' + ID + '"', function () {
assert.isUndefined($el.attr('target'));
});
it('does not set target="_blank" for unmanaged folders if disabled', function () {
it('does not set target=\'_blank\' for unmanaged folders if disabled', function () {
this.xSettings.unmanagedInNewWindow = false;

View File

@@ -4,7 +4,7 @@
var ID = 'core/notify';
var DEPS = ['$'];
describe('module "' + ID + '"', function () {
describe('module \'' + ID + '\'', function () {
before(function () {

View File

@@ -4,7 +4,7 @@
var ID = 'core/resource';
var DEPS = ['_', 'config', 'core/settings'];
describe('module "' + ID + '"', function () {
describe('module \'' + ID + '\'', function () {
before(function () {

View File

@@ -5,7 +5,7 @@ var ID = 'core/server';
var DEPS = ['_', '$', 'config', 'core/location'];
var $submitSnap;
describe('module "' + ID + '"', function () {
describe('module \'' + ID + '\'', function () {
before(function () {

View File

@@ -4,7 +4,7 @@
var ID = 'core/settings';
var DEPS = ['_', 'config'];
describe('module "' + ID + '"', function () {
describe('module \'' + ID + '\'', function () {
before(function () {

View File

@@ -4,7 +4,7 @@
var ID = 'core/store';
var DEPS = ['modernizr'];
describe('module "' + ID + '"', function () {
describe('module \'' + ID + '\'', function () {
before(function () {

View File

@@ -4,7 +4,7 @@
var ID = 'core/types';
var DEPS = ['_', 'config'];
describe('module "' + ID + '"', function () {
describe('module \'' + ID + '\'', function () {
before(function () {

View File

@@ -4,7 +4,7 @@
var ID = 'core/util';
var DEPS = [];
describe('module "' + ID + '"', function () {
describe('module \'' + ID + '\'', function () {
before(function () {
@@ -81,7 +81,7 @@ describe('module "' + ID + '"', function () {
var arg2 = data[1];
var exp = data[2];
it('.regularCmpFn("' + arg1 + '", "' + arg2 + '") => "' + exp + '"', function () {
it('.regularCmpFn(\'' + arg1 + '\', \'' + arg2 + '\') => \'' + exp + '\'', function () {
var instance = this.applyFn();
assert.strictEqual(instance.regularCmpFn(arg1, arg2), exp);
@@ -111,7 +111,7 @@ describe('module "' + ID + '"', function () {
var arg2 = data[1];
var exp = data[2];
it('.naturalCmpFn("' + arg1 + '", "' + arg2 + '") => "' + exp + '"', function () {
it('.naturalCmpFn(\'' + arg1 + '\', \'' + arg2 + '\') => \'' + exp + '\'', function () {
var instance = this.applyFn();
assert.strictEqual(instance.naturalCmpFn(arg1, arg2), exp);