Skip to content

Commit 0eb3eee

Browse files
committed
Tests: Test names refactoring.
1 parent 969ecfe commit 0eb3eee

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

tests/ckeditor.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ describe( 'CKEditor Component', () => {
2828
wrapper.destroy();
2929
} );
3030

31-
it( 'component should have a name', () => {
31+
it( 'should have a name', () => {
3232
expect( CKEditorComponent.name ).to.equal( 'ckeditor' );
3333
} );
3434

35-
it( 'calls editor#create when initializing', async () => {
35+
it( 'should call editor#create when initializing', async () => {
3636
const stub = sandbox.stub( MockEditor, 'create' ).resolves( new MockEditor() );
3737
const { wrapper } = createComponent();
3838

@@ -42,7 +42,7 @@ describe( 'CKEditor Component', () => {
4242
wrapper.destroy();
4343
} );
4444

45-
it( 'calls editor#destroy when destroying', async () => {
45+
it( 'should call editor#destroy when destroying', async () => {
4646
const stub = sandbox.stub( MockEditor.prototype, 'destroy' ).resolves();
4747
const { wrapper, vm } = createComponent();
4848

@@ -53,7 +53,7 @@ describe( 'CKEditor Component', () => {
5353
expect( vm.instance ).to.be.null;
5454
} );
5555

56-
it( 'passes editor promise rejection error to console.error', async () => {
56+
it( 'should pass the editor promise rejection error to console#error()', async () => {
5757
const error = new Error( 'Something went wrong.' );
5858
const consoleErrorStub = sandbox.stub( console, 'error' );
5959

@@ -73,7 +73,7 @@ describe( 'CKEditor Component', () => {
7373

7474
describe( 'properties', () => {
7575
describe( '#editor', () => {
76-
it( 'accepts an editor constructor', async () => {
76+
it( 'should accept an editor constructor', async () => {
7777
const { wrapper, vm } = createComponent( {
7878
editor: MockEditor
7979
} );
@@ -145,7 +145,7 @@ describe( 'CKEditor Component', () => {
145145
expect( vm.config ).to.deep.equal( {} );
146146
} );
147147

148-
it( 'should set the initial editor#config', async () => {
148+
it( 'should be set according to the initial editor#config', async () => {
149149
const { wrapper, vm } = createComponent( {
150150
config: { foo: 'bar' }
151151
} );
@@ -259,14 +259,14 @@ describe( 'CKEditor Component', () => {
259259
} );
260260

261261
describe( 'events', () => {
262-
it( 'emits #ready when editor is created', async () => {
262+
it( 'should emit #ready when the editor is created', async () => {
263263
await Vue.nextTick();
264264

265265
expect( wrapper.emitted().ready.length ).to.equal( 1 );
266266
expect( wrapper.emitted().ready[ 0 ] ).to.deep.equal( [ vm.instance ] );
267267
} );
268268

269-
it( 'emits #destroy when editor is destroyed', async () => {
269+
it( 'should emit #destroy when the editor is destroyed', async () => {
270270
const { wrapper, vm } = createComponent();
271271

272272
await Vue.nextTick();
@@ -328,7 +328,7 @@ describe( 'CKEditor Component', () => {
328328
} );
329329
} );
330330

331-
it( 'emits #focus when editor editable is focused', async () => {
331+
it( 'should emit #focus when the editor editable is focused', async () => {
332332
sandbox.stub( ViewDocument.prototype, 'on' );
333333

334334
await Vue.nextTick();
@@ -350,7 +350,7 @@ describe( 'CKEditor Component', () => {
350350
] );
351351
} );
352352

353-
it( 'emits #blur when editor editable is focused', async () => {
353+
it( 'should emits #blur when the editor editable is blurred', async () => {
354354
sandbox.stub( ViewDocument.prototype, 'on' );
355355

356356
await Vue.nextTick();

tests/plugin/integration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Vue.use( CKEditor );
1414

1515
describe( 'CKEditor plugin', () => {
1616
describe( 'Vue.use()', () => {
17-
it( 'works with an actual editor build', done => {
17+
it( 'should work with an actual editor build', done => {
1818
const domElement = document.createElement( 'div' );
1919
document.body.appendChild( domElement );
2020

tests/plugin/localcomponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class FooEditor extends MockEditor {}
1212
class BarEditor extends MockEditor {}
1313

1414
describe( 'CKEditor plugin', () => {
15-
it( 'works when the component is used locally', async () => {
15+
it( 'should work when the component is used locally', async () => {
1616
const wrapperFoo = mount( {
1717
template: '<ckeditor :editor="editorType"></ckeditor>',
1818
components: {

0 commit comments

Comments
 (0)