Skip to content

Commit beac184

Browse files
authored
Merge pull request #40 from EMResearch/js-refactoring
Js refactoring
2 parents 15473aa + d786142 commit beac184

95 files changed

Lines changed: 20360 additions & 13039 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,27 +159,35 @@ hs_err_pid*
159159

160160
### JavaScript
161161
/venv/
162-
/js_npm/rest/ncs/build/
163162
/js_npm/evomaster-client-js/
163+
/js_npm/rest/ncs/build/
164+
/js_npm/rest/ncs/instrumented/
164165
/js_npm/rest/ncs/node_modules/
165166
/js_npm/rest/ncs/em/EvoMasterTest.js
166167
/js_npm/rest/ncs/coverage/
167168
/js_npm/rest/cyclotron/node_modules/
168169
/js_npm/rest/cyclotron/build/
170+
/js_npm/rest/cyclotron/instrumented/
169171
/js_npm/rest/cyclotron/em/EvoMasterTest.js
170172
/js_npm/rest/cyclotron/em/samples
171173
/js_npm/rest/cyclotron/coverage/
172174
/js_npm/rest/scs/node_modules/
173175
/js_npm/rest/scs/build/
176+
/js_npm/rest/scs/instrumented/
174177
/js_npm/rest/scs/em/EvoMasterTest.js
175178
/js_npm/rest/disease-sh-api/node_modules/
176179
/js_npm/rest/disease-sh-api/build/
180+
/js_npm/rest/disease-sh-api/instrumented/
177181
/js_npm/rest/disease-sh-api/EvoMasterTest.js
178182
/js_npm/rest/disease-sh-api/redis/
179183
/js_npm/rest/realworld-app/node_modules/
180184
/js_npm/rest/realworld-app/build/
185+
/js_npm/rest/realworld-app/instrumented/
186+
/js_npm/rest/realworld-app/dist/
187+
/js_npm/rest/realworld-app/instrumented/
181188
/js_npm/rest/spacex-api/node_modules/
182189
/js_npm/rest/spacex-api/build/
190+
/js_npm/rest/spacex-api/instrumented/
183191
/js_npm/graphql/react-finland/build/
184192
/js_npm/graphql/react-finland/.idea/
185193
/js_npm/graphql/react-finland/node_modules/
@@ -190,7 +198,6 @@ hs_err_pid*
190198
/js_npm/graphql/ecommerce-server/instrumented/
191199
/js_npm/graphql/ecommerce-server/src/graphql/schemas/schema.gql
192200

193-
194201
#DotNet
195202
[Dd]ebug/
196203
[Bb]in/
@@ -212,3 +219,4 @@ dotnet_3/em/embedded/rest/SampleProjectDriver/logs/
212219

213220

214221

222+

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ We just re-implemented in different languages, and put them behind a web service
104104

105105
### GraphQL: Java/Kotlin
106106

107-
* Spring-Pet-Clinic (Apache ), from [https://github.com/spring-petclinic/spring-petclinic-graphql]()
107+
* Spring-Pet-Clinic (Apache), from [https://github.com/spring-petclinic/spring-petclinic-graphql]()
108108

109109
* Patio-Api (GPL), from [https://github.com/patio-team/patio-api]()
110110

@@ -115,6 +115,12 @@ We just re-implemented in different languages, and put them behind a web service
115115
* SCS (not-known license, artificial string examples coming from different sources)
116116

117117

118+
### GraphQL: JavaScript/TypeScript
119+
120+
* React-Finland (not-known license), from [https://github.com/ReactFinland/graphql-api](https://github.com/ReactFinland/graphql-api)
121+
122+
* E-Commerce Server (MIT), from [https://github.com/react-shop/react-ecommerce](https://github.com/react-shop/react-ecommerce)
123+
118124
### RPC (Thrift/gRPC): Java
119125

120126
* NCS (not-known license, artificial numerical examples coming from different sources)

js_npm/graphql/ecommerce-server/em/app-driver.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ const superagent = require("superagent");
66

77
class AppController extends em.SutController {
88

9-
setupForGeneratedTest() {
10-
}
11-
129
getInfoForAuthentication() {
1310
let jwtLogin = new em.dto.JsonTokenPostLoginDto();
1411
jwtLogin.endpoint = "/graphql";

js_npm/graphql/ecommerce-server/package-lock.json

Lines changed: 31 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js_npm/graphql/ecommerce-server/package.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"private": true,
77
"license": "UNLICENSED",
88
"scripts": {
9-
"prebuild": "rimraf dist",
10-
"build": "nest build && npm run instrument",
9+
"prebuild": "rimraf build",
10+
"build": "nest build",
1111
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
1212
"start": "nest start",
1313
"dev": "nest start --watch",
@@ -19,8 +19,8 @@
1919
"test:cov": "jest --coverage",
2020
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
2121
"test:e2e": "jest --config ./test/jest-e2e.json",
22-
"instrument": "rimraf instrumented && babel dist em -d instrumented/src --copy-files ",
23-
"em": "node instrumented/src/em-main.js"
22+
"em:run": "node instrumented/em/em-main.js",
23+
"em:build": "npm run build && rimraf instrumented && babel build -d instrumented --copy-files && babel em -d instrumented/em --copy-files && babel em -d build/em --copy-files "
2424
},
2525
"dependencies": {
2626
"@nestjs/common": "^8.0.0",
@@ -78,7 +78,7 @@
7878
},
7979
"babel": {
8080
"only": [
81-
"dist"
81+
"build"
8282
],
8383
"plugins": [
8484
"module:evomaster-client-js"
@@ -90,11 +90,8 @@
9090
"json",
9191
"ts"
9292
],
93-
"rootDir": "src",
94-
"testRegex": ".*\\.spec\\.ts$",
95-
"transform": {
96-
"^.+\\.(t|j)s$": "ts-jest"
97-
},
93+
"rootDir": "build/em",
94+
"testRegex": ".*Test.js$",
9895
"collectCoverageFrom": [
9996
"**/*.(t|j)s"
10097
],

js_npm/graphql/ecommerce-server/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"allowSyntheticDefaultImports": true,
99
"target": "es2017",
1010
"sourceMap": true,
11-
"outDir": "./dist",
11+
"outDir": "./build/src",
1212
"incremental": true,
1313
"skipLibCheck": true,
1414
"baseUrl": "./src",

js_npm/graphql/react-finland/em/app-driver.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require( "reflect-metadata");
2+
13
const http = require("http");
24
const {AddressInfo} = require("net");
35

@@ -6,7 +8,6 @@ const em = require("evomaster-client-js");
68
const createApp = require("../server/app").default;
79

810

9-
1011
class AppController extends em.SutController {
1112

1213
setupForGeneratedTest(){

js_npm/graphql/react-finland/em/em-main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require( "reflect-metadata");
1+
22

33
const AppController = require("./app-driver");
44
const em = require("evomaster-client-js");

0 commit comments

Comments
 (0)