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

Commit 3fc5ec1

Browse files
chore: add test script for all examples (#26)
* chore: add test script for all examples * fix: remove test:example script
1 parent 915a55e commit 3fc5ec1

File tree

35 files changed

+230
-227
lines changed

35 files changed

+230
-227
lines changed

examples/browser-add-readable-stream/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"build": "parcel build index.html --no-scope-hoist",
1111
"serve": "parcel serve index.html --open -p 8888",
1212
"start": "npm run serve",
13-
"test:example": "npm run build && playwright test tests"
13+
"test": "npm run build && playwright test tests"
1414
},
1515
"browserslist": "last 1 Chrome version",
1616
"dependencies": {

examples/browser-angular/README.md

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# BrowserAngular
2-
31
<p align="center">
42
<a href="https://js.ipfs.io" title="JS IPFS">
53
<img src="https://ipfs.io/ipfs/Qme6KJdKcp85TYbLxuLV7oQzMiLremD7HMoXLZEmgo6Rnh/js-ipfs-sticker.png" alt="IPFS in JavaScript logo" width="244" />
@@ -25,23 +23,22 @@
2523

2624
## Table of Contents
2725

28-
- [BrowserAngular](#browserangular)
29-
- [Table of Contents](#table-of-contents)
30-
- [About The Project](#about-the-project)
31-
- [Getting Started](#getting-started)
32-
- [Pre requisites](#pre-requisites)
33-
- [Installation and Running example](#installation-and-running-example)
34-
- [Available Scripts from create-react-app](#available-scripts-from-create-react-app)
35-
- [Development server](#development-server)
36-
- [Code scaffolding](#code-scaffolding)
37-
- [Build](#build)
38-
- [Running unit tests](#running-unit-tests)
39-
- [Running end-to-end tests](#running-end-to-end-tests)
40-
- [Further help](#further-help)
41-
- [Usage](#usage)
42-
- [Documentation](#documentation)
43-
- [Contributing](#contributing)
44-
- [Want to hack on IPFS?](#want-to-hack-on-ipfs)
26+
- [Table of Contents](#table-of-contents)
27+
- [About The Project](#about-the-project)
28+
- [Getting Started](#getting-started)
29+
- [Pre requisites](#pre-requisites)
30+
- [Installation and Running example](#installation-and-running-example)
31+
- [Available Scripts from create-react-app](#available-scripts-from-create-react-app)
32+
- [Development server](#development-server)
33+
- [Code scaffolding](#code-scaffolding)
34+
- [Build](#build)
35+
- [Running unit tests](#running-unit-tests)
36+
- [Running end-to-end tests](#running-end-to-end-tests)
37+
- [Further help](#further-help)
38+
- [Usage](#usage)
39+
- [Documentation](#documentation)
40+
- [Contributing](#contributing)
41+
- [Want to hack on IPFS?](#want-to-hack-on-ipfs)
4542

4643
## About The Project
4744

examples/browser-angular/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "browser-angular",
2+
"name": "example-browser-angular",
33
"version": "0.0.0",
44
"private": true,
55
"scripts": {
@@ -8,8 +8,8 @@
88
"start": "ng serve",
99
"build": "ng build",
1010
"watch": "ng build --watch --configuration development",
11-
"test": "ng test",
12-
"test:example": "npm run build && playwright test tests"
11+
"test:angular": "ng test",
12+
"test": "npm run build && playwright test tests"
1313
},
1414
"dependencies": {
1515
"@angular/animations": "~12.2.0",

examples/browser-browserify/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"build": "copyfiles -u 1 -a './public/**/*' './dist' && browserify ./src/index.js > ./dist/bundle.js",
1111
"serve": "http-server dist -a 127.0.0.1 -p 8888",
1212
"start": "npm run build && npm run serve",
13-
"test:example": "npm run build && playwright test tests"
13+
"test": "npm run build && playwright test tests"
1414
},
1515
"dependencies": {
1616
"ipfs": "^0.58.1"

examples/browser-create-react-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"build": "react-scripts build",
1010
"eject": "react-scripts eject",
1111
"start": "react-scripts start",
12-
"test": "react-scripts test",
13-
"test:example": "npm run build && playwright test tests"
12+
"test:react": "react-scripts test",
13+
"test": "npm run build && playwright test tests"
1414
},
1515
"browserslist": {
1616
"production": [

examples/browser-exchange-files/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"build": "parcel build index.html --no-scope-hoist",
99
"serve": "parcel serve index.html --open -p 8888",
1010
"start": "npm run serve",
11-
"test": "playwright test",
12-
"test:example": "npm run build && playwright test tests --retries=3"
11+
"test": "npm run build && playwright test tests --retries=3"
1312
},
1413
"browserslist": "last 1 Chrome version",
1514
"dependencies": {

examples/browser-ipns-publish/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"build": "parcel build index.html --no-scope-hoist",
1919
"serve": "parcel serve index.html --open -p 8888",
2020
"start": "npm run serve",
21-
"test:example": "npm run build && playwright test tests --retries=3"
21+
"test": "npm run build && playwright test tests --retries=3"
2222
},
2323
"browserslist": "last 1 Chrome version",
2424
"dependencies": {

examples/browser-mfs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"build": "parcel build index.html --no-scope-hoist",
1111
"serve": "parcel serve index.html --open -p 8888",
1212
"start": "npm run serve",
13-
"test:example": "npm run build && playwright test tests"
13+
"test": "npm run build && playwright test tests"
1414
},
1515
"browserslist": "last 1 Chrome version",
1616
"dependencies": {

examples/browser-nextjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"serve": "npm run dev",
1010
"start": "next start",
1111
"lint": "next lint",
12-
"test:example": "npm run build && playwright test tests"
12+
"test": "npm run build && playwright test tests"
1313
},
1414
"dependencies": {
1515
"ipfs": "^0.58.1",

examples/browser-parceljs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"build": "parcel build index.html --no-scope-hoist",
1212
"serve": "parcel serve index.html --open -p 8888",
1313
"start": "npm run serve",
14-
"test:example": "npm run build && playwright test tests"
14+
"test": "npm run build && playwright test tests"
1515
},
1616
"browserslist": "last 1 Chrome version",
1717
"dependencies": {

examples/browser-readablestream/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"build": "parcel build index.html --no-scope-hoist",
1111
"serve": "parcel serve index.html --open -p 8888",
1212
"start": "npm run serve",
13-
"test:example": "npm run build && playwright test tests"
13+
"test": "npm run build && playwright test tests"
1414
},
1515
"browserslist": "last 1 Chrome version",
1616
"dependencies": {

examples/browser-script-tag/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#
2-
31
<p align="center">
42
<a href="https://js.ipfs.io" title="JS IPFS">
53
<img src="https://ipfs.io/ipfs/Qme6KJdKcp85TYbLxuLV7oQzMiLremD7HMoXLZEmgo6Rnh/js-ipfs-sticker.png" alt="IPFS in JavaScript logo" width="244" />

examples/browser-script-tag/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"build": "parcel build index.html --no-scope-hoist",
1111
"serve": "parcel serve index.html --open -p 8888",
1212
"start": "npm run serve",
13-
"test:example": "npm run build && playwright test tests"
13+
"test": "npm run build && playwright test tests"
1414
},
1515
"browserslist": "last 1 Chrome version",
1616
"devDependencies": {

examples/browser-service-worker/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
"clean": "rm -rf ./dist",
1010
"build": "webpack",
1111
"start": "webpack-dev-server",
12-
"test": "test-ipfs-example",
13-
"test:example": "test-ipfs-example"
12+
"test": "test-ipfs-example"
1413
},
1514
"dependencies": {
1615
"ipfs": "^0.58.1",

examples/browser-sharing-node-across-tabs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"build": "parcel build index.html --no-scope-hoist",
1111
"serve": "parcel serve index.html --open -p 8888",
1212
"start": "npm run serve",
13-
"test:example": "npm run build && playwright test tests"
13+
"test": "npm run build && playwright test tests"
1414
},
1515
"browserslist": "last 1 Chrome version",
1616
"dependencies": {

examples/browser-video-streaming/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"build": "parcel build index.html --no-scope-hoist",
1111
"serve": "parcel serve index.html --open -p 8888",
1212
"start": "npm run serve",
13-
"test:example": "npm run build && playwright test tests --browser=firefox --retries=3"
13+
"test": "npm run build && playwright test tests --browser=firefox --retries=3"
1414
},
1515
"browserslist": "last 1 Chrome version",
1616
"dependencies": {

examples/browser-vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build": "vue-cli-service build",
1010
"start": "npm run serve",
1111
"lint": "vue-cli-service lint",
12-
"test:example": "npm run build && playwright test tests"
12+
"test": "npm run build && playwright test tests"
1313
},
1414
"browserslist": [
1515
"> 1%",

examples/browser-webpack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"build": "webpack --env production",
1111
"serve": "webpack serve --hot-only --mode=development",
1212
"start": "npm run serve",
13-
"test:example": "npm run build && playwright test tests"
13+
"test": "npm run build && playwright test tests"
1414
},
1515
"browserslist": [
1616
"last 1 Chrome version"

examples/circuit-relaying/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"build": "parcel build index.html --no-scope-hoist",
1212
"serve": "parcel serve index.html --open -p 8888",
1313
"start": "npm run serve",
14-
"test:example": "npm run build && playwright test tests"
14+
"test": "npm run build && playwright test tests"
1515
},
1616
"browserslist": "last 1 Chrome version",
1717
"dependencies": {

examples/custom-ipfs-repo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"clean": "echo 'Nothing to clean...'",
1010
"start": "node index.js",
1111
"serve": "npm run start",
12-
"test:example": "node tests/test.js"
12+
"test": "node tests/test.js"
1313
},
1414
"dependencies": {
1515
"@ipld/dag-cbor": "^6.0.5",

examples/custom-ipld-formats/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"clean": "echo 'Nothing to clean...'",
88
"start": "node in-process-node.js & node daemon-node.js",
99
"serve": "npm run start",
10-
"test:example": "node tests/test.js"
10+
"test": "node tests/test.js"
1111
},
1212
"dependencies": {
1313
"dag-jose": "^1.0.0",

examples/custom-libp2p/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"clean": "echo 'Nothing to clean...'",
1010
"start": "node index.js",
1111
"serve": "npm run start",
12-
"test:example": "node tests/test.js"
12+
"test": "node tests/test.js"
1313
},
1414
"dependencies": {
1515
"@chainsafe/libp2p-noise": "^4.0.0",

examples/http-client-browser-pubsub/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"build": "parcel build index.html --no-scope-hoist",
1111
"serve": "parcel serve index.html --open -p 8888",
1212
"start": "npm run serve",
13-
"test:example": "npm run build && playwright test tests"
13+
"test": "npm run build && playwright test tests"
1414
},
1515
"browserslist": "last 1 Chrome version",
1616
"dependencies": {

examples/http-client-bundle-webpack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"build": "webpack --env production",
1212
"serve": "webpack serve --hot-only --mode=development",
1313
"start": "npm run serve",
14-
"test:example": "npm run build && playwright test tests"
14+
"test": "npm run build && playwright test tests"
1515
},
1616
"browserslist": [
1717
"last 1 Chrome version"

examples/http-client-name-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"build": "parcel build index.html --no-scope-hoist",
1111
"serve": "parcel serve index.html --open -p 8888",
1212
"start": "npm run serve",
13-
"test:example": "npm run build && playwright test tests"
13+
"test": "npm run build && playwright test tests"
1414
},
1515
"browserslist": "last 1 Chrome version",
1616
"dependencies": {

examples/http-client-upload-file/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"build": "parcel build index.html --no-scope-hoist",
1414
"serve": "parcel serve index.html --open -p 8888",
1515
"start": "npm run serve",
16-
"test:example": "npm run build && playwright test tests"
16+
"test": "npm run build && playwright test tests"
1717
},
1818
"browserslist": "last 1 Chrome version",
1919
"dependencies": {

examples/ipfs-101/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"clean": "echo 'Nothing to clean...'",
1111
"start": "node index.js",
1212
"serve": "npm run start",
13-
"test:example": "node tests/test.js"
13+
"test": "node tests/test.js"
1414
},
1515
"dependencies": {
1616
"ipfs": "^0.58.1",

examples/ipfs-client-add-files/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"build": "parcel build index.html --no-scope-hoist",
99
"serve": "parcel serve index.html --open -p 8888",
1010
"start": "npm run serve",
11-
"test:example": "npm run build && playwright test tests"
11+
"test": "npm run build && playwright test tests"
1212
},
1313
"browserslist": "last 1 Chrome version",
1414
"dependencies": {

examples/run-in-electron/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"clean": "echo 'Nothing to clean...'",
1616
"start": "electron .",
1717
"serve": "npm run start",
18-
"test:example": "node test.js"
18+
"test": "node test.js"
1919
},
2020
"dependencies": {
2121
"ipfs": "^0.58.1"

examples/running-multiple-nodes/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"main": "index.js",
99
"scripts": {
1010
"clean": "echo 'Nothing to clean...'",
11-
"start": "npm run test:example",
11+
"start": "npm run test",
1212
"serve": "npm run start",
13-
"test:example": "node tests/test.js"
13+
"test": "node tests/test.js"
1414
},
1515
"dependencies": {
1616
"ipfs": "^0.58.1"

examples/traverse-ipld-graphs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"main": "index.js",
99
"scripts": {
1010
"clean": "echo 'Nothing to clean...'",
11-
"start": "npm run test:example",
11+
"start": "npm run test",
1212
"serve": "npm run start",
13-
"test:example": "node tests/test.js"
13+
"test": "node tests/test.js"
1414
},
1515
"dependencies": {
1616
"@ipld/dag-pb": "^2.1.3",

examples/types-use-ipfs-from-ts/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"description": "Template for using js-ipfs in typescript project",
66
"scripts": {
77
"clean": "echo 'Nothing to clean...'",
8-
"test": "tsc --noEmit",
9-
"test:example": "npm run test"
8+
"test": "tsc --noEmit"
109
},
1110
"dependencies": {
1211
"ipfs": "^0.58.1",

examples/types-use-ipfs-from-typed-js/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"description": "Template for setting up a project with JSDoc",
66
"scripts": {
77
"clean": "echo 'Nothing to clean...'",
8-
"test": "tsc --noEmit",
9-
"test:example": "npm run test"
8+
"test": "tsc --noEmit"
109
},
1110
"dependencies": {
1211
"ipfs": "^0.58.1"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"clean:yarn": "rimraf ./**/yarn.lock",
2626
"clean:build": "rimraf ./**/.parcel-cache",
2727
"clean:examples": "yarn workspaces run clean",
28-
"test:examples": "yarn workspaces run test:example",
28+
"test:examples": "yarn workspaces run test",
2929
"test": "yarn run test:examples",
3030
"chore:update-dependencies": "node scripts/update-example-deps.js"
3131
},

0 commit comments

Comments
 (0)