From fc8c5fdce62fb229202659408798a7b6c98f6e8b Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 28 Apr 2023 01:36:55 +0800 Subject: --- cli/internal/graph/graph_test.go | 50 ---------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 cli/internal/graph/graph_test.go (limited to 'cli/internal/graph/graph_test.go') diff --git a/cli/internal/graph/graph_test.go b/cli/internal/graph/graph_test.go deleted file mode 100644 index 9323e19..0000000 --- a/cli/internal/graph/graph_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package graph - -import ( - "testing" - - "gotest.tools/v3/assert" -) - -func Test_CommandsInvokingTurbo(t *testing.T) { - type testCase struct { - command string - match bool - } - testCases := []testCase{ - { - "turbo run foo", - true, - }, - { - "rm -rf ~/Library/Caches/pnpm && turbo run foo && rm -rf ~/.npm", - true, - }, - { - "FLAG=true turbo run foo", - true, - }, - { - "npx turbo run foo", - true, - }, - { - "echo starting; turbo foo; echo done", - true, - }, - // We don't catch this as if people are going to try to invoke the turbo - // binary directly, they'll always be able to work around us. - { - "./node_modules/.bin/turbo foo", - false, - }, - { - "rm -rf ~/Library/Caches/pnpm && rm -rf ~/Library/Caches/turbo && rm -rf ~/.npm && rm -rf ~/.pnpm-store && rm -rf ~/.turbo", - false, - }, - } - - for _, tc := range testCases { - assert.Equal(t, commandLooksLikeTurbo(tc.command), tc.match, tc.command) - } -} -- cgit v1.2.3-70-g09d2