Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

chore: add test script for all examples #26

Merged
merged 2 commits into from
Aug 24, 2021
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
2 changes: 1 addition & 1 deletion examples/browser-add-readable-stream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "parcel build index.html --no-scope-hoist",
"serve": "parcel serve index.html --open -p 8888",
"start": "npm run serve",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"browserslist": "last 1 Chrome version",
"dependencies": {
Expand Down
35 changes: 16 additions & 19 deletions examples/browser-angular/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# BrowserAngular

<p align="center">
<a href="https://js.ipfs.io" title="JS IPFS">
<img src="https://ipfs.io/ipfs/Qme6KJdKcp85TYbLxuLV7oQzMiLremD7HMoXLZEmgo6Rnh/js-ipfs-sticker.png" alt="IPFS in JavaScript logo" width="244" />
Expand All @@ -25,23 +23,22 @@

## Table of Contents

- [BrowserAngular](#browserangular)
- [Table of Contents](#table-of-contents)
- [About The Project](#about-the-project)
- [Getting Started](#getting-started)
- [Pre requisites](#pre-requisites)
- [Installation and Running example](#installation-and-running-example)
- [Available Scripts from create-react-app](#available-scripts-from-create-react-app)
- [Development server](#development-server)
- [Code scaffolding](#code-scaffolding)
- [Build](#build)
- [Running unit tests](#running-unit-tests)
- [Running end-to-end tests](#running-end-to-end-tests)
- [Further help](#further-help)
- [Usage](#usage)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [Want to hack on IPFS?](#want-to-hack-on-ipfs)
- [Table of Contents](#table-of-contents)
- [About The Project](#about-the-project)
- [Getting Started](#getting-started)
- [Pre requisites](#pre-requisites)
- [Installation and Running example](#installation-and-running-example)
- [Available Scripts from create-react-app](#available-scripts-from-create-react-app)
- [Development server](#development-server)
- [Code scaffolding](#code-scaffolding)
- [Build](#build)
- [Running unit tests](#running-unit-tests)
- [Running end-to-end tests](#running-end-to-end-tests)
- [Further help](#further-help)
- [Usage](#usage)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [Want to hack on IPFS?](#want-to-hack-on-ipfs)

## About The Project

Expand Down
6 changes: 3 additions & 3 deletions examples/browser-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "browser-angular",
"name": "example-browser-angular",
"version": "0.0.0",
"private": true,
"scripts": {
Expand All @@ -8,8 +8,8 @@
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"test:example": "npm run build && playwright test tests"
"test:angular": "ng test",
"test": "npm run build && playwright test tests"
},
"dependencies": {
"@angular/animations": "~12.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-browserify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "copyfiles -u 1 -a './public/**/*' './dist' && browserify ./src/index.js > ./dist/bundle.js",
"serve": "http-server dist -a 127.0.0.1 -p 8888",
"start": "npm run build && npm run serve",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"dependencies": {
"ipfs": "^0.58.1"
Expand Down
4 changes: 2 additions & 2 deletions examples/browser-create-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"build": "react-scripts build",
"eject": "react-scripts eject",
"start": "react-scripts start",
"test": "react-scripts test",
"test:example": "npm run build && playwright test tests"
"test:react": "react-scripts test",
"test": "npm run build && playwright test tests"
},
"browserslist": {
"production": [
Expand Down
3 changes: 1 addition & 2 deletions examples/browser-exchange-files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"build": "parcel build index.html --no-scope-hoist",
"serve": "parcel serve index.html --open -p 8888",
"start": "npm run serve",
"test": "playwright test",
"test:example": "npm run build && playwright test tests --retries=3"
"test": "npm run build && playwright test tests --retries=3"
},
"browserslist": "last 1 Chrome version",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-ipns-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"build": "parcel build index.html --no-scope-hoist",
"serve": "parcel serve index.html --open -p 8888",
"start": "npm run serve",
"test:example": "npm run build && playwright test tests --retries=3"
"test": "npm run build && playwright test tests --retries=3"
},
"browserslist": "last 1 Chrome version",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-mfs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "parcel build index.html --no-scope-hoist",
"serve": "parcel serve index.html --open -p 8888",
"start": "npm run serve",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"browserslist": "last 1 Chrome version",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"serve": "npm run dev",
"start": "next start",
"lint": "next lint",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"dependencies": {
"ipfs": "^0.58.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-parceljs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"build": "parcel build index.html --no-scope-hoist",
"serve": "parcel serve index.html --open -p 8888",
"start": "npm run serve",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"browserslist": "last 1 Chrome version",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-readablestream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "parcel build index.html --no-scope-hoist",
"serve": "parcel serve index.html --open -p 8888",
"start": "npm run serve",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"browserslist": "last 1 Chrome version",
"dependencies": {
Expand Down
2 changes: 0 additions & 2 deletions examples/browser-script-tag/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#

<p align="center">
<a href="https://js.ipfs.io" title="JS IPFS">
<img src="https://ipfs.io/ipfs/Qme6KJdKcp85TYbLxuLV7oQzMiLremD7HMoXLZEmgo6Rnh/js-ipfs-sticker.png" alt="IPFS in JavaScript logo" width="244" />
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-script-tag/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "parcel build index.html --no-scope-hoist",
"serve": "parcel serve index.html --open -p 8888",
"start": "npm run serve",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"browserslist": "last 1 Chrome version",
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions examples/browser-service-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"clean": "rm -rf ./dist",
"build": "webpack",
"start": "webpack-dev-server",
"test": "test-ipfs-example",
"test:example": "test-ipfs-example"
"test": "test-ipfs-example"
},
"dependencies": {
"ipfs": "^0.58.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-sharing-node-across-tabs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "parcel build index.html --no-scope-hoist",
"serve": "parcel serve index.html --open -p 8888",
"start": "npm run serve",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"browserslist": "last 1 Chrome version",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-video-streaming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "parcel build index.html --no-scope-hoist",
"serve": "parcel serve index.html --open -p 8888",
"start": "npm run serve",
"test:example": "npm run build && playwright test tests --browser=firefox --retries=3"
"test": "npm run build && playwright test tests --browser=firefox --retries=3"
},
"browserslist": "last 1 Chrome version",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "vue-cli-service build",
"start": "npm run serve",
"lint": "vue-cli-service lint",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"browserslist": [
"> 1%",
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "webpack --env production",
"serve": "webpack serve --hot-only --mode=development",
"start": "npm run serve",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"browserslist": [
"last 1 Chrome version"
Expand Down
2 changes: 1 addition & 1 deletion examples/circuit-relaying/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"build": "parcel build index.html --no-scope-hoist",
"serve": "parcel serve index.html --open -p 8888",
"start": "npm run serve",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"browserslist": "last 1 Chrome version",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-ipfs-repo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"clean": "echo 'Nothing to clean...'",
"start": "node index.js",
"serve": "npm run start",
"test:example": "node tests/test.js"
"test": "node tests/test.js"
},
"dependencies": {
"@ipld/dag-cbor": "^6.0.5",
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-ipld-formats/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"clean": "echo 'Nothing to clean...'",
"start": "node in-process-node.js & node daemon-node.js",
"serve": "npm run start",
"test:example": "node tests/test.js"
"test": "node tests/test.js"
},
"dependencies": {
"dag-jose": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-libp2p/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"clean": "echo 'Nothing to clean...'",
"start": "node index.js",
"serve": "npm run start",
"test:example": "node tests/test.js"
"test": "node tests/test.js"
},
"dependencies": {
"@chainsafe/libp2p-noise": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/http-client-browser-pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "parcel build index.html --no-scope-hoist",
"serve": "parcel serve index.html --open -p 8888",
"start": "npm run serve",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"browserslist": "last 1 Chrome version",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/http-client-bundle-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"build": "webpack --env production",
"serve": "webpack serve --hot-only --mode=development",
"start": "npm run serve",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"browserslist": [
"last 1 Chrome version"
Expand Down
2 changes: 1 addition & 1 deletion examples/http-client-name-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "parcel build index.html --no-scope-hoist",
"serve": "parcel serve index.html --open -p 8888",
"start": "npm run serve",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"browserslist": "last 1 Chrome version",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/http-client-upload-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build": "parcel build index.html --no-scope-hoist",
"serve": "parcel serve index.html --open -p 8888",
"start": "npm run serve",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"browserslist": "last 1 Chrome version",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/ipfs-101/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"clean": "echo 'Nothing to clean...'",
"start": "node index.js",
"serve": "npm run start",
"test:example": "node tests/test.js"
"test": "node tests/test.js"
},
"dependencies": {
"ipfs": "^0.58.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/ipfs-client-add-files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "parcel build index.html --no-scope-hoist",
"serve": "parcel serve index.html --open -p 8888",
"start": "npm run serve",
"test:example": "npm run build && playwright test tests"
"test": "npm run build && playwright test tests"
},
"browserslist": "last 1 Chrome version",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/run-in-electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"clean": "echo 'Nothing to clean...'",
"start": "electron .",
"serve": "npm run start",
"test:example": "node test.js"
"test": "node test.js"
},
"dependencies": {
"ipfs": "^0.58.1"
Expand Down
4 changes: 2 additions & 2 deletions examples/running-multiple-nodes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"main": "index.js",
"scripts": {
"clean": "echo 'Nothing to clean...'",
"start": "npm run test:example",
"start": "npm run test",
"serve": "npm run start",
"test:example": "node tests/test.js"
"test": "node tests/test.js"
},
"dependencies": {
"ipfs": "^0.58.1"
Expand Down
4 changes: 2 additions & 2 deletions examples/traverse-ipld-graphs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"main": "index.js",
"scripts": {
"clean": "echo 'Nothing to clean...'",
"start": "npm run test:example",
"start": "npm run test",
"serve": "npm run start",
"test:example": "node tests/test.js"
"test": "node tests/test.js"
},
"dependencies": {
"@ipld/dag-pb": "^2.1.3",
Expand Down
3 changes: 1 addition & 2 deletions examples/types-use-ipfs-from-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"description": "Template for using js-ipfs in typescript project",
"scripts": {
"clean": "echo 'Nothing to clean...'",
"test": "tsc --noEmit",
"test:example": "npm run test"
"test": "tsc --noEmit"
},
"dependencies": {
"ipfs": "^0.58.1",
Expand Down
3 changes: 1 addition & 2 deletions examples/types-use-ipfs-from-typed-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"description": "Template for setting up a project with JSDoc",
"scripts": {
"clean": "echo 'Nothing to clean...'",
"test": "tsc --noEmit",
"test:example": "npm run test"
"test": "tsc --noEmit"
},
"dependencies": {
"ipfs": "^0.58.1"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"clean:yarn": "rimraf ./**/yarn.lock",
"clean:build": "rimraf ./**/.parcel-cache",
"clean:examples": "yarn workspaces run clean",
"test:examples": "yarn workspaces run test:example",
"test:examples": "yarn workspaces run test",
"test": "yarn run test:examples",
"chore:update-dependencies": "node scripts/update-example-deps.js"
},
Expand Down
Loading