mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 02:02:35 -05:00
Fix more floating promises (#8460)
This commit is contained in:
@@ -29,7 +29,7 @@ const testColumns: string[] = [
|
||||
];
|
||||
|
||||
suite('Insights Dialog Controller Tests', () => {
|
||||
test('updates correctly with good input', done => {
|
||||
test('updates correctly with good input', async (done) => {
|
||||
|
||||
let model = new InsightsDialogModel();
|
||||
|
||||
@@ -71,20 +71,19 @@ suite('Insights Dialog Controller Tests', () => {
|
||||
options: {}
|
||||
};
|
||||
|
||||
controller.update(<IInsightsConfigDetails>{ query: 'query' }, profile).then(() => {
|
||||
// Once we update the controller, listen on when it changes the model and verify the data it
|
||||
// puts in is correct
|
||||
model.onDataChange(() => {
|
||||
for (let i = 0; i < testData.length; i++) {
|
||||
for (let j = 0; j < testData[i].length; j++) {
|
||||
equal(testData[i][j], model.rows[i][j]);
|
||||
}
|
||||
await controller.update(<IInsightsConfigDetails>{ query: 'query' }, profile);
|
||||
// Once we update the controller, listen on when it changes the model and verify the data it
|
||||
// puts in is correct
|
||||
model.onDataChange(() => {
|
||||
for (let i = 0; i < testData.length; i++) {
|
||||
for (let j = 0; j < testData[i].length; j++) {
|
||||
equal(testData[i][j], model.rows[i][j]);
|
||||
}
|
||||
done();
|
||||
});
|
||||
// Fake the query Runner telling the controller the query is complete
|
||||
complete();
|
||||
}
|
||||
done();
|
||||
});
|
||||
// Fake the query Runner telling the controller the query is complete
|
||||
complete();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user