Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: pull-request

on:
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.TRAMVAI_GH_PAGES_PAT }}

- uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: yarn bootstrap

- name: Build packages
run: yarn build

- name: Test packages
run: yarn test

size:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v4

- uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.TRAMVAI_GH_PAGES_PAT }}
17 changes: 0 additions & 17 deletions .github/workflows/size.yml

This file was deleted.

10 changes: 9 additions & 1 deletion packages/plugin-protocol-http/src/http.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
const fetch = jest.fn();

jest.mock('undici', () => {
return {
...jest.requireActual('undici'),
fetch: fetch
};
});

import { Context, Status } from '@tinkoff/request-core';
import http from './http';

const fetch = jest.spyOn(globalThis, 'fetch');
const plugin = http();
const next = jest.fn();

Expand Down