Browse Source

yarn workspace added

Gleb Urvanov 5 years ago
parent
commit
5985c1b165
5 changed files with 51 additions and 33 deletions
  1. 6 0
      .gitignore
  2. 5 0
      README.md
  3. 11 0
      package.json
  4. 0 4
      tests/.gitignore
  5. 29 29
      tests/package.json

+ 6 - 0
.gitignore

@@ -8,6 +8,12 @@
 # runtime built with docker build script
 joystream_runtime.wasm
 
+# Node modules directory
+**/node_modules
+
+# Generated by yarn
+yarn*
+
 # JetBrains IDEs
 .idea
 

+ 5 - 0
README.md

@@ -79,6 +79,11 @@ This will build and run a fresh new local development chain purging existing one
 cargo test
 ```
 
+### API integration tests
+
+```bash
+yarn test
+```
 
 ## Joystream Runtime
 

+ 11 - 0
package.json

@@ -0,0 +1,11 @@
+{
+	"private": true,
+	"name": "joystream",
+	"license": "GPL-3.0-only",
+	"scripts": {
+		"test": "yarn && yarn workspaces run test"
+	},
+	"workspaces": [
+		"tests"
+	]
+}

+ 0 - 4
tests/.gitignore

@@ -1,4 +0,0 @@
-.vscode/
-dist/
-node_modules/
-yarn*

+ 29 - 29
tests/package.json

@@ -1,31 +1,31 @@
 {
-  "name": "joystream-testing",
-  "version": "0.1.0",
-  "license": "GPL-3.0-only",
-  "scripts": {
-    "build": "tsc --build tsconfig.json",
-    "test": "mocha -r ts-node/register src/tests/*",
-    "lint": "tslint --project tsconfig.json",
-    "prettier": "prettier --write ./src"
-  },
-  "dependencies": {
-    "@joystream/types": "^0.6.0",
-    "@polkadot/api": "^0.96.1",
-    "@polkadot/keyring": "^1.7.0-beta.5",
-    "@polkadot/types": "^0.96.1",
-    "@types/bn.js": "^4.11.5",
-    "bn.js": "^4.11.8",
-    "dotenv": "^8.2.0"
-  },
-  "devDependencies": {
-    "@polkadot/ts": "^0.3.14",
-    "@types/chai": "^4.2.11",
-    "@types/mocha": "^7.0.2",
-    "chai": "^4.2.0",
-    "mocha": "^7.1.1",
-    "prettier": "2.0.2",
-    "ts-node": "^8.8.1",
-    "tslint": "^6.1.0",
-    "typescript": "^3.8.3"
-  }
+	"name": "joystream-testing",
+	"version": "0.1.0",
+	"license": "GPL-3.0-only",
+	"scripts": {
+		"build": "tsc --build tsconfig.json",
+		"test": "mocha -r ts-node/register src/tests/*",
+		"lint": "tslint --project tsconfig.json",
+		"prettier": "prettier --write ./src"
+	},
+	"dependencies": {
+		"@joystream/types": "^0.6.0",
+		"@polkadot/api": "^0.96.1",
+		"@polkadot/keyring": "^1.7.0-beta.5",
+		"@polkadot/types": "^0.96.1",
+		"@types/bn.js": "^4.11.5",
+		"bn.js": "^4.11.8",
+		"dotenv": "^8.2.0"
+	},
+	"devDependencies": {
+		"@polkadot/ts": "^0.3.14",
+		"@types/chai": "^4.2.11",
+		"@types/mocha": "^7.0.2",
+		"chai": "^4.2.0",
+		"mocha": "^7.1.1",
+		"prettier": "2.0.2",
+		"ts-node": "^8.8.1",
+		"tslint": "^6.1.0",
+		"typescript": "^3.8.3"
+	}
 }