Combine beforeEach blocks
I don't know why there are two.
This commit is contained in:
@@ -45,6 +45,11 @@ describe('query-history', () => {
|
|||||||
let tryOpenExternalFile: Function;
|
let tryOpenExternalFile: Function;
|
||||||
let sandbox: sinon.SinonSandbox;
|
let sandbox: sinon.SinonSandbox;
|
||||||
|
|
||||||
|
let allHistory: QueryHistoryInfo[];
|
||||||
|
let localQueryHistory: LocalQueryInfo[];
|
||||||
|
let remoteQueryHistory: RemoteQueryHistoryItem[];
|
||||||
|
let variantAnalysisHistory: VariantAnalysisHistoryItem[];
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
sandbox = sinon.createSandbox();
|
sandbox = sinon.createSandbox();
|
||||||
|
|
||||||
@@ -80,6 +85,27 @@ describe('query-history', () => {
|
|||||||
removeVariantAnalysis: sandbox.stub(),
|
removeVariantAnalysis: sandbox.stub(),
|
||||||
showView: sandbox.stub(),
|
showView: sandbox.stub(),
|
||||||
} as any as VariantAnalysisManager;
|
} as any as VariantAnalysisManager;
|
||||||
|
|
||||||
|
localQueryHistory = [
|
||||||
|
createMockLocalQuery('a', createMockQueryWithResults(sandbox, true)),
|
||||||
|
createMockLocalQuery('b', createMockQueryWithResults(sandbox, true)),
|
||||||
|
createMockLocalQuery('a', createMockQueryWithResults(sandbox, false)),
|
||||||
|
createMockLocalQuery('a', createMockQueryWithResults(sandbox, true)),
|
||||||
|
];
|
||||||
|
remoteQueryHistory = [
|
||||||
|
createMockRemoteQueryHistoryItem({}),
|
||||||
|
createMockRemoteQueryHistoryItem({}),
|
||||||
|
createMockRemoteQueryHistoryItem({}),
|
||||||
|
createMockRemoteQueryHistoryItem({})
|
||||||
|
];
|
||||||
|
variantAnalysisHistory = [
|
||||||
|
createMockVariantAnalysisHistoryItem(),
|
||||||
|
createMockVariantAnalysisHistoryItem(),
|
||||||
|
createMockVariantAnalysisHistoryItem(),
|
||||||
|
createMockVariantAnalysisHistoryItem()
|
||||||
|
];
|
||||||
|
allHistory = shuffleHistoryItems([...localQueryHistory, ...remoteQueryHistory, ...variantAnalysisHistory]);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
@@ -131,33 +157,6 @@ describe('query-history', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
let allHistory: QueryHistoryInfo[];
|
|
||||||
let localQueryHistory: LocalQueryInfo[];
|
|
||||||
let remoteQueryHistory: RemoteQueryHistoryItem[];
|
|
||||||
let variantAnalysisHistory: VariantAnalysisHistoryItem[];
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
localQueryHistory = [
|
|
||||||
createMockLocalQuery('a', createMockQueryWithResults(sandbox, true)),
|
|
||||||
createMockLocalQuery('b', createMockQueryWithResults(sandbox, true)),
|
|
||||||
createMockLocalQuery('a', createMockQueryWithResults(sandbox, false)),
|
|
||||||
createMockLocalQuery('a', createMockQueryWithResults(sandbox, true)),
|
|
||||||
];
|
|
||||||
remoteQueryHistory = [
|
|
||||||
createMockRemoteQueryHistoryItem({}),
|
|
||||||
createMockRemoteQueryHistoryItem({}),
|
|
||||||
createMockRemoteQueryHistoryItem({}),
|
|
||||||
createMockRemoteQueryHistoryItem({})
|
|
||||||
];
|
|
||||||
variantAnalysisHistory = [
|
|
||||||
createMockVariantAnalysisHistoryItem(),
|
|
||||||
createMockVariantAnalysisHistoryItem(),
|
|
||||||
createMockVariantAnalysisHistoryItem(),
|
|
||||||
createMockVariantAnalysisHistoryItem()
|
|
||||||
];
|
|
||||||
allHistory = shuffleHistoryItems([...localQueryHistory, ...remoteQueryHistory, ...variantAnalysisHistory]);
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Local Queries', () => {
|
describe('Local Queries', () => {
|
||||||
describe('findOtherQueryToCompare', () => {
|
describe('findOtherQueryToCompare', () => {
|
||||||
it('should find the second query to compare when one is selected', async () => {
|
it('should find the second query to compare when one is selected', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user