mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-01 11:08:11 +08:00
flakey test
This commit is contained in:
@@ -76,7 +76,7 @@ describe("PromiseLimit", () => {
|
||||
const plimit = new PromiseLimit(1);
|
||||
|
||||
let finishOrder = 0;
|
||||
const callback = () => async () => {
|
||||
const callback = async () => {
|
||||
await delay(100);
|
||||
const result = finishOrder;
|
||||
finishOrder += 1;
|
||||
@@ -84,11 +84,11 @@ describe("PromiseLimit", () => {
|
||||
};
|
||||
|
||||
const result = await Promise.all([
|
||||
plimit.add(callback()),
|
||||
plimit.priorityAdd(4, callback()),
|
||||
plimit.priorityAdd(0, callback()),
|
||||
plimit.priorityAdd(1, callback()),
|
||||
plimit.priorityAdd(-1, callback()),
|
||||
plimit.add(callback),
|
||||
plimit.priorityAdd(4, callback),
|
||||
plimit.priorityAdd(0, callback),
|
||||
plimit.priorityAdd(1, callback),
|
||||
plimit.priorityAdd(-1, callback),
|
||||
]);
|
||||
|
||||
expect(result).toEqual([0, 4, 2, 3, 1]);
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@
|
||||
"dev": "npm run build -- configuration/webpack/webpack.config.dev.js",
|
||||
"e2e": "jest --config __tests__/e2e/e2eJestConfig.json e2e/e2e.test.js",
|
||||
"e2e-annotations": "jest --config __tests__/e2e/e2eJestConfig.json e2e/e2eAnnotations.test.js",
|
||||
"fmt": "eslint --fix src __tests__",
|
||||
"lint": "eslint --fix src __tests__",
|
||||
"fmt": "eslint --fix __tests__",
|
||||
"lint": "eslint --fix __tests__",
|
||||
"prod": "npm run build -- configuration/webpack/webpack.config.prod.js",
|
||||
"test": "jest --testPathIgnorePatterns e2e",
|
||||
"prepare": "cd .. && husky install client/.husky"
|
||||
|
||||
Reference in New Issue
Block a user