From 2572be22f4dcb34b94b773d97e155b8c52e459aa Mon Sep 17 00:00:00 2001 From: Steven Normore Date: Tue, 24 Oct 2023 09:43:21 -0400 Subject: [PATCH] Support running specific tests via npm run test Update the package.json/scripts/test entry to include a `--` suffix so that we can run specific tests via `npm run test`, for example `npm run test -- -t 'viem'`. Without this suffix, using `-- -t '...'` doesn't work, but `npm run test:node` does. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e9e8d860d..1485823f8 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "updateSnapVersion": "npm view @xmtp/snap --json | jq '{\"version\": .version, \"package\": .name}' > ./src/snapInfo.json", "test:setup": "./dev/up", "test:teardown": "./dev/down", - "test": "npm run test:node", + "test": "npm run test:node --", "test:node": "jest --no-cache --env='node' --testTimeout=30000", "test:jsdom": "jest --no-cache --env='./jest.jsdom.env.cjs' --testTimeout=30000", "test:cov": "jest --coverage --no-cache --runInBand",