We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mockApi
Describe the bug It seems like mockApi is failing in a WSL2 windows 11 environment
To Reproduce
name: Act Push Test 1 on: push jobs: push1: runs-on: ubuntu-latest steps: - run: echo "push 1" - name: secrets run: echo $TEST1 env: TEST1: ${{secrets.SECRET1}} - name: env run: echo $ENV1 - name: pass run: echo "pass" - name: fail run: echo "fail" && exit 1
Taken from act.test.ts
test("run with proxy", async () => { const mockapi = new Mockapi({ google: { baseUrl: "http://google.com", endpoints: { root: { get: { path: "/", method: "get", parameters: { query: [], path: [], body: [], }, }, }, }, }, }); const act = new Act(); const output = await act.runJob("mock", { workflowFile: resources, mockApi: [ mockapi.mock.google.root .get() .setResponse({ status: 200, data: "mock response" }), ], }); expect(output).toStrictEqual([ { name: "Main https api call", status: 0, output: expect.stringMatching(/<HTML><HEAD>.+/), }, { name: "Main http api call", status: 0, output: "mock response", }, ]); });
Expected behavior Test should pass. Test passes in other linux environments
Logs
run › run with proxy expect(received).toStrictEqual(expected) // deep equality - Expected - 7 + Received + 2 Array [ Object { "name": "Main https api call", - "output": StringMatching /<HTML><HEAD>.+/, - "status": 0, - }, - Object { - "name": "Main http api call", - "output": "mock response", - "status": 0, + "output": "", + "status": 1, }, ] 133 | ], 134 | }); > 135 | expect(output).toStrictEqual([ | ^ 136 | { 137 | name: "Main https api call", 138 | status: 0, at Object.<anonymous> (test/unit/act/act.test.ts:135:20)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
It seems like
mockApi
is failing in a WSL2 windows 11 environmentTo Reproduce
Workflow
Code
Taken from act.test.ts
Expected behavior
Test should pass. Test passes in other linux environments
Logs
The text was updated successfully, but these errors were encountered: