mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-03-13 17:04:39 -04:00
Remove test for canceling a search
When no Device Manager instance is present this test takes a long time and can cause timeouts. We'll need to fake the HTTP requests if we want to do this sort of test reliably.
This commit is contained in:
parent
9a9c509e76
commit
96c74867b5
1 changed files with 0 additions and 25 deletions
|
@ -19,28 +19,3 @@ test('default connected', t => {
|
|||
t.strictEqual(deviceManager.isConnected, true);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('cancel searchAndConnect', t => {
|
||||
const deviceManager = new DeviceManager();
|
||||
|
||||
const finder = deviceManager.searchAndConnect('test extension', 'test device');
|
||||
|
||||
let resolved = false;
|
||||
let rejected = false;
|
||||
const testPromise = finder.promise
|
||||
.then(
|
||||
() => {
|
||||
resolved = true;
|
||||
},
|
||||
() => {
|
||||
rejected = true;
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
t.strictEqual(resolved, false);
|
||||
t.strictEqual(rejected, true);
|
||||
});
|
||||
finder.cancel();
|
||||
|
||||
return testPromise;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue