Skip to content

Commit

Permalink
Remove all browser testing attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
surilindur committed Mar 24, 2024
1 parent 2080374 commit 5a5d9df
Show file tree
Hide file tree
Showing 10 changed files with 88 additions and 2,470 deletions.
31 changes: 2 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- run: yarn install --immutable
- run: yarn run lint

jest:
test:
needs: lint
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -56,36 +56,9 @@ jobs:
flag-name: run-${{ matrix.node-version }}
parallel: true

browser:
needs: lint
strategy:
matrix:
browser:
- firefox
- chromium
- webkit
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: latest
- run: git config --global core.autocrlf input
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: '**/.yarn'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- run: corepack enable
- run: yarn install --immutable
- run: yarn run build
- uses: coactions/setup-xvfb@v1
with:
run: yarn web-test-runner --playwright --browsers ${{ matrix.browser }}

coveralls:
needs:
- jest
- browser
- test
runs-on: ubuntu-latest
steps:
- name: Consolidate test coverage from different jobs
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.yarn
coverage
dist
node_modules
index.js
index.js.map
Expand Down
1 change: 0 additions & 1 deletion index.ts

This file was deleted.

16 changes: 16 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/** @type {import('jest').Config} */
module.exports = {
transform: {
'^.+\\.ts$': 'ts-jest',
},
transformIgnorePatterns: [
'^.+\\.js',
],
testRegex: '^.+-test\\.ts$',
moduleFileExtensions: [
'js',
'ts',
],
collectCoverage: true,
testEnvironment: 'node',
};
1 change: 1 addition & 0 deletions lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { readableFromWeb } from './ReadableFromWeb';
26 changes: 3 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@comunica/readable-from-web",
"type": "commonjs",
"version": "1.0.0",
"packageManager": "[email protected]",
"description": "Experimental converter from WHATWG ReadableStream to readable-stream Readable",
Expand All @@ -9,12 +10,9 @@
"bugs": {
"url": "https://github.com/comunica/readable-from-web/issues"
},
"main": "index.js",
"types": "index",
"main": "lib/index.js",
"types": "lib/index",
"files": [
"index.d.ts",
"index.js",
"index.js.map",
"lib/*.d.ts",
"lib/*.js",
"lib/*.js.map"
Expand All @@ -31,9 +29,6 @@
"@rubensworks/eslint-config": "^3.0.0",
"@types/jest": "^29.0.0",
"@types/readable-stream": "^4.0.0",
"@web/dev-server-esbuild": "^1.0.0",
"@web/test-runner": "^0.18.0",
"@web/test-runner-playwright": "^0.11.0",
"eslint": "8.48.0",
"husky": "^4.0.0",
"jest": "^29.0.0",
Expand All @@ -47,20 +42,5 @@
"hooks": {
"pre-commit": "yarn run lint && yarn run build && yarn run test"
}
},
"jest": {
"transform": {
"^.+\\.ts$": "ts-jest"
},
"transformIgnorePatterns": [
"^.+\\.js"
],
"testRegex": "^.+-test\\.ts$",
"moduleFileExtensions": [
"js",
"ts"
],
"collectCoverage": true,
"testEnvironment": "node"
}
}
4 changes: 2 additions & 2 deletions test/ReadableFromWeb-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ const readableToWeb: ReadableToWeb = require('readable-stream-node-to-web');
const streamToString: StreamToString = require('stream-to-string');
const stringToStream: StringToStream = require('streamify-string');

describe('readableFromWeb', () => {
describe('ReadableFromWeb', () => {
let originalStream: Readable;
let whatwgStream: ReadableStream;
let readableStreamReadable: Readable;
let expectedError: Error;

beforeEach(() => {
beforeEach(async() => {
originalStream = stringToStream('abc');
whatwgStream = readableToWeb(originalStream);
readableStreamReadable = readableFromWeb(whatwgStream);
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"compileOnSave": true,
"compilerOptions": {
"target": "es6",
"target": "esnext",
"lib": [
"es6",
"esnext",
"dom"
],
"module": "commonjs",
Expand Down
8 changes: 0 additions & 8 deletions web-test-runner.config.js

This file was deleted.

Loading

0 comments on commit 5a5d9df

Please sign in to comment.