test: ensure single top-level describe block in test file (#1094)

This makes it easier to map test output to files and allows for common
setup & teardown of all tests in a file.

* test(prepare): wrap in top-level describe block
* test(Api): wrap in top-level describe block
This commit is contained in:
Raphael von der Grün 2020-10-17 23:20:37 +02:00
parent 3b56160d38
commit b1f01d7a65
2 changed files with 704 additions and 700 deletions

View File

@ -29,6 +29,7 @@ var PluginInfo = common.PluginInfo;
var FIXTURES = path.join(__dirname, '../e2e/fixtures');
var FAKE_PROJECT_DIR = path.join(os.tmpdir(), 'plugin-test-project');
describe('Api', () => {
describe('addPlugin method', function () {
var api, Api;
@ -65,3 +66,4 @@ describe('addPlugin method', function () {
});
});
});
});

View File

@ -81,6 +81,7 @@ function mockGetIconItem (data) {
}, data);
}
describe('prepare', () => {
describe('updateIcons method', function () {
// Rewire
let prepare;
@ -832,3 +833,4 @@ describe('prepare arguments', () => {
).toBeResolved();
});
});
});