Commit ca93060 1 parent e8bcfb4 commit ca93060 Copy full SHA for ca93060
File tree 3 files changed +14
-9
lines changed
3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 4
4
"description" : " ESLint will run on saving." ,
5
5
"license" : " MIT" ,
6
6
"contributors" : [
7
- {
8
- "name" : " Ricardo Gobbo de Souza <ricardogobbosouza@yahoo.com.br>"
9
- }
7
+ " Ricardo Gobbo de Souza <ricardogobbosouza@yahoo.com.br>"
10
8
],
11
9
"main" : " lib/module.js" ,
12
10
"repository" : " https://github.com/nuxt-community/eslint-module" ,
42
40
"eslint-plugin-promise" : " latest" ,
43
41
"eslint-plugin-standard" : " latest" ,
44
42
"eslint-plugin-vue" : " latest" ,
43
+ "get-port" : " latest" ,
45
44
"husky" : " latest" ,
46
45
"jest" : " latest" ,
47
46
"nuxt-edge" : " latest" ,
Original file line number Diff line number Diff line change 1
1
jest . setTimeout ( 60000 )
2
- process . env . PORT = process . env . PORT || 5060
3
2
4
3
const { Nuxt, Builder } = require ( 'nuxt-edge' )
5
4
const request = require ( 'request-promise-native' )
5
+ const getPort = require ( 'get-port' )
6
6
7
7
const config = require ( '../example/nuxt.config' )
8
8
9
- const url = path => `http://localhost:${ process . env . PORT } ${ path } `
10
- const get = path => request ( url ( path ) )
9
+ let nuxt , port
11
10
12
- describe ( 'basic' , ( ) => {
13
- let nuxt
11
+ const url = path => `http://localhost: ${ port } ${ path } `
12
+ const get = path => request ( url ( path ) )
14
13
14
+ describe ( 'module' , ( ) => {
15
15
beforeAll ( async ( ) => {
16
16
config . dev = true
17
17
config . debug = true
18
18
nuxt = new Nuxt ( config )
19
19
await new Builder ( nuxt ) . build ( )
20
- await nuxt . listen ( process . env . PORT )
20
+ port = await getPort ( )
21
+ await nuxt . listen ( port )
21
22
} )
22
23
23
24
afterAll ( async ( ) => {
Original file line number Diff line number Diff line change @@ -4108,6 +4108,11 @@ get-pkg-repo@^1.0.0:
4108
4108
parse-github-repo-url "^1.3.0"
4109
4109
through2 "^2.0.0"
4110
4110
4111
+ get-port@latest :
4112
+ version "4.1.0"
4113
+ resolved "https://registry.yarnpkg.com/get-port/-/get-port-4.1.0.tgz#93eb3d5552c197497d76e9c389a6ac9920e20192"
4114
+ integrity sha512-4/fqAYrzrzOiqDrdeZRKXGdTGgbkfTEumGlNQPeP6Jy8w0PzN9mzeNQ3XgHaTNie8pQ3hOUkrwlZt2Fzk5H9mA==
4115
+
4111
4116
get-stdin@5.0.1 :
4112
4117
version "5.0.1"
4113
4118
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398"
You can’t perform that action at this time.
0 commit comments