Skip to content

Commit e618253

Browse files
fix: remove comment, trailing space and duplicate from tests
1 parent ce3a91c commit e618253

25 files changed

+146
-199
lines changed

test/unit/specs/fields/fieldCheckbox.spec.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,16 @@ describe("FieldCheckbox.vue", function() {
3535

3636
expect(input).to.be.defined;
3737
expect(input.type).to.be.equal("checkbox");
38-
// expect(input.disabled).to.be.false;
3938
});
4039

4140
it("should contain the value", (done) => {
4241
vm.$nextTick( () => {
43-
expect(input.checked).to.be.true;
42+
expect(input.checked).to.be.true;
4443
done();
4544
});
4645
});
4746

4847
describe("check optional attribute", () => {
49-
// name which attributes you want to test and that's it.
5048
let attributes = ["autocomplete", "disabled"];
5149

5250
attributes.forEach(function(name) {
@@ -59,7 +57,7 @@ describe("FieldCheckbox.vue", function() {
5957
it("input value should be the model value after changed", (done) => {
6058
model.status = false;
6159
vm.$nextTick( () => {
62-
expect(input.checked).to.be.false;
60+
expect(input.checked).to.be.false;
6361
done();
6462
});
6563

@@ -70,7 +68,7 @@ describe("FieldCheckbox.vue", function() {
7068
trigger(input, "change");
7169

7270
vm.$nextTick( () => {
73-
expect(model.status).to.be.true;
71+
expect(model.status).to.be.true;
7472
done();
7573
});
7674

test/unit/specs/fields/fieldChecklist.spec.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe("fieldChecklist.vue", function() {
8181
trigger(checkboxes[0], "change");
8282

8383
vm.$nextTick( () => {
84-
expect(model.skills).to.be.deep.equal(["ReactJS", "HTML5"]);
84+
expect(model.skills).to.be.deep.equal(["ReactJS", "HTML5"]);
8585
done();
8686
});
8787

@@ -145,7 +145,7 @@ describe("fieldChecklist.vue", function() {
145145
trigger(checkboxes[0], "change");
146146

147147
vm.$nextTick( () => {
148-
expect(model.skills).to.be.deep.equal([3, 1]);
148+
expect(model.skills).to.be.deep.equal([3, 1]);
149149
done();
150150
});
151151

@@ -211,13 +211,13 @@ describe("fieldChecklist.vue", function() {
211211
trigger(checkboxes[0], "change");
212212

213213
vm.$nextTick( () => {
214-
expect(model.skills).to.be.deep.equal([3, 1]);
214+
expect(model.skills).to.be.deep.equal([3, 1]);
215215
done();
216216
});
217217

218218
});
219219

220-
});
220+
});
221221

222222
});
223223

@@ -308,7 +308,7 @@ describe("fieldChecklist.vue", function() {
308308
trigger(checkboxes[0], "change");
309309

310310
vm.$nextTick( () => {
311-
expect(model.skills).to.be.deep.equal(["ReactJS", "HTML5"]);
311+
expect(model.skills).to.be.deep.equal(["ReactJS", "HTML5"]);
312312
done();
313313
});
314314

@@ -319,7 +319,7 @@ describe("fieldChecklist.vue", function() {
319319
trigger(checkboxes[0], "change");
320320

321321
vm.$nextTick( () => {
322-
expect(model.skills).to.be.deep.equal(["ReactJS"]);
322+
expect(model.skills).to.be.deep.equal(["ReactJS"]);
323323
done();
324324
});
325325

@@ -331,11 +331,11 @@ describe("fieldChecklist.vue", function() {
331331
trigger(checkboxes[0], "change");
332332

333333
vm.$nextTick( () => {
334-
expect(model.skills).to.be.deep.equal(["HTML5"]);
334+
expect(model.skills).to.be.deep.equal(["HTML5"]);
335335
done();
336336
});
337337

338-
});
338+
});
339339

340340
});
341341

test/unit/specs/fields/fieldCleave.spec.js

+6-10
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,16 @@ describe("fieldCleave.vue", function() {
4242
expect(input).to.be.defined;
4343
expect(input.type).to.be.equal("text");
4444
expect(input.classList.contains("form-control")).to.be.true;
45-
// expect(input.placeholder).to.be.equal(schema.placeholder);
46-
// expect(input.readOnly).to.be.false;
47-
// expect(input.disabled).to.be.false;
4845
});
4946

5047
it("should contain the value", (done) => {
5148
vm.$nextTick( () => {
52-
expect(input.value).to.be.equal("30 123 4567");
49+
expect(input.value).to.be.equal("30 123 4567");
5350
done();
5451
});
5552
});
5653

5754
describe("check optional attribute", () => {
58-
// name which attributes you want to test and that's it.
5955
let attributes = ["autocomplete", "disabled", "readonly"];
6056

6157
attributes.forEach(function(name) {
@@ -68,7 +64,7 @@ describe("fieldCleave.vue", function() {
6864
it("input value should be the model value after changed", (done) => {
6965
model.phone = "70 555 4433";
7066
vm.$nextTick( () => {
71-
expect(input.value).to.be.equal("70 555 4433");
67+
expect(input.value).to.be.equal("70 555 4433");
7268
done();
7369
});
7470

@@ -79,23 +75,23 @@ describe("fieldCleave.vue", function() {
7975
trigger(input, "input");
8076

8177
vm.$nextTick( () => {
82-
expect(model.phone).to.be.equal("21 888 6655");
78+
expect(model.phone).to.be.equal("21 888 6655");
8379
done();
8480
});
8581

8682
});
8783

8884
it("should be formatted data in model", (done) => {
8985
field.cleave.setRawValue("301234567");
90-
expect(input.value).to.be.equal("30 123 4567");
86+
expect(input.value).to.be.equal("30 123 4567");
9187
trigger(input, "change");
9288

9389
vm.$nextTick( () => {
94-
expect(model.phone).to.be.equal("30 123 4567");
90+
expect(model.phone).to.be.equal("30 123 4567");
9591
done();
9692
});
9793

98-
});
94+
});
9995

10096
});
10197

test/unit/specs/fields/fieldColor.spec.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,16 @@ describe("fieldColor.vue", function() {
3535

3636
expect(input).to.be.defined;
3737
expect(input.type).to.be.equal("color");
38-
//expect(input.classList.contains("form-control")).to.be.true;
39-
// expect(input.disabled).to.be.false;
4038
});
4139

4240
it("should contain the value", (done) => {
4341
vm.$nextTick( () => {
44-
expect(input.value).to.be.equal("#ff8822");
42+
expect(input.value).to.be.equal("#ff8822");
4543
done();
4644
});
4745
});
4846

4947
describe("check optional attribute", () => {
50-
// name which attributes you want to test and that's it.
5148
let attributes = ["autocomplete"];
5249

5350
attributes.forEach(function(name) {
@@ -60,7 +57,7 @@ describe("fieldColor.vue", function() {
6057
it("input value should be the model value after changed", (done) => {
6158
model.color = "#ffff00";
6259
vm.$nextTick( () => {
63-
expect(input.value).to.be.equal("#ffff00");
60+
expect(input.value).to.be.equal("#ffff00");
6461
done();
6562
});
6663

@@ -71,7 +68,7 @@ describe("fieldColor.vue", function() {
7168
trigger(input, "change");
7269

7370
vm.$nextTick( () => {
74-
expect(model.color).to.be.equal("#123456");
71+
expect(model.color).to.be.equal("#123456");
7572
done();
7673
});
7774

test/unit/specs/fields/fieldDateTime.spec.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,16 @@ describe("fieldDateTime.vue", function() {
3939
expect(input).to.be.defined;
4040
expect(input.type).to.be.equal("text");
4141
expect(input.classList.contains("form-control")).to.be.true;
42-
expect(input.disabled).to.be.false;
4342
});
4443

4544
it("should contain the value", (done) => {
4645
vm.$nextTick( () => {
47-
expect(input.value).to.be.equal( moment(1462799081231).format("YYYY-MM-DD HH:mm:ss") );
46+
expect(input.value).to.be.equal( moment(1462799081231).format("YYYY-MM-DD HH:mm:ss") );
4847
done();
4948
});
5049
});
5150

5251
describe("check optional attribute", () => {
53-
// name which attributes you want to test and that's it.
5452
let attributes = ["autocomplete", "disabled", "placeholder", "readonly"];
5553

5654
attributes.forEach(function(name) {
@@ -63,7 +61,7 @@ describe("fieldDateTime.vue", function() {
6361
it("input value should be the model value after changed", (done) => {
6462
model.event = 1234567890123;
6563
vm.$nextTick( () => {
66-
expect(input.value).to.be.equal( moment(1234567890123).format("YYYY-MM-DD HH:mm:ss") );
64+
expect(input.value).to.be.equal( moment(1234567890123).format("YYYY-MM-DD HH:mm:ss") );
6765
done();
6866
});
6967

@@ -74,7 +72,7 @@ describe("fieldDateTime.vue", function() {
7472
trigger(input, "input");
7573

7674
vm.$nextTick( () => {
77-
expect(model.event).to.be.equal(1420194153000);
75+
expect(model.event).to.be.equal(1420194153000);
7876
done();
7977
});
8078

@@ -102,7 +100,7 @@ describe("fieldDateTime.vue", function() {
102100

103101
it("should contain the value", (done) => {
104102
vm.$nextTick( () => {
105-
expect(input.value).to.be.equal( moment("20160509", schema.format).format(schema.dateTimePickerOptions.format) );
103+
expect(input.value).to.be.equal( moment("20160509", schema.format).format(schema.dateTimePickerOptions.format) );
106104
done();
107105
});
108106
});
@@ -112,11 +110,11 @@ describe("fieldDateTime.vue", function() {
112110
trigger(input, "input");
113111

114112
vm.$nextTick( () => {
115-
expect(model.event).to.be.equal( "20150102" );
113+
expect(model.event).to.be.equal( "20150102" );
116114
done();
117115
});
118116

119-
});
117+
});
120118
});
121119

122120
});

test/unit/specs/fields/fieldEmail.spec.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,16 @@ describe("fieldEmail.vue", function() {
3939
expect(input).to.be.defined;
4040
expect(input.type).to.be.equal("email");
4141
expect(input.classList.contains("form-control")).to.be.true;
42-
// expect(input.placeholder).to.be.equal(schema.placeholder);
43-
// expect(input.readOnly).to.be.false;
44-
// expect(input.disabled).to.be.false;
4542
});
4643

4744
it("should contain the value", (done) => {
4845
vm.$nextTick( () => {
49-
expect(input.value).to.be.equal("[email protected]");
46+
expect(input.value).to.be.equal("[email protected]");
5047
done();
5148
});
5249
});
5350

5451
describe("check optional attribute", () => {
55-
// name which attributes you want to test and that's it.
5652
let attributes = ["autocomplete", "disabled", "placeholder", "readonly"];
5753

5854
attributes.forEach(function(name) {
@@ -65,7 +61,7 @@ describe("fieldEmail.vue", function() {
6561
it("input value should be the model value after changed", (done) => {
6662
model.email = "[email protected]";
6763
vm.$nextTick( () => {
68-
expect(input.value).to.be.equal("[email protected]");
64+
expect(input.value).to.be.equal("[email protected]");
6965
done();
7066
});
7167

@@ -76,7 +72,7 @@ describe("fieldEmail.vue", function() {
7672
trigger(input, "input");
7773

7874
vm.$nextTick( () => {
79-
expect(model.email).to.be.equal("[email protected]");
75+
expect(model.email).to.be.equal("[email protected]");
8076
done();
8177
});
8278

test/unit/specs/fields/fieldGoogleAddress.spec.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,16 @@ describe("fieldGoogleAddress.vue", function() {
3838
expect(input).to.be.defined;
3939
expect(input.type).to.be.equal("text");
4040
expect(input.classList.contains("form-control")).to.be.true;
41-
// expect(input.placeholder).to.be.equal(schema.placeholder);
42-
// expect(input.readOnly).to.be.false;
43-
// expect(input.disabled).to.be.false;
4441
});
4542

4643
it("should contain the value", (done) => {
4744
vm.$nextTick( () => {
48-
expect(input.value).to.be.equal("Paris, France");
45+
expect(input.value).to.be.equal("Paris, France");
4946
done();
5047
});
5148
});
5249

5350
describe("check optional attribute", () => {
54-
// name which attributes you want to test and that's it.
5551
let attributes = ["autocomplete", "disabled", "placeholder", "readonly"];
5652

5753
attributes.forEach(function(name) {
@@ -64,7 +60,7 @@ describe("fieldGoogleAddress.vue", function() {
6460
it("input value should be the model value after changed", (done) => {
6561
model.address = "Rome, Italy";
6662
vm.$nextTick( () => {
67-
expect(input.value).to.be.equal("Rome, Italy");
63+
expect(input.value).to.be.equal("Rome, Italy");
6864
done();
6965
});
7066

0 commit comments

Comments
 (0)