Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
pagedjs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
144
Issues
144
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tools
pagedjs
Commits
82ffbf9d
Commit
82ffbf9d
authored
May 08, 2018
by
Fred Chasen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Specs
parent
7233c8be
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
14 additions
and
9 deletions
+14
-9
jest.config.js
jest.config.js
+0
-6
package.json
package.json
+2
-1
default-test-js-break-should-create-a-pdf-1-snap.png
...ts__/default-test-js-break-should-create-a-pdf-1-snap.png
+0
-0
default.html
specs/default/default.html
+0
-0
default.test.js
specs/default/default.test.js
+0
-0
jest.config.js
specs/jest.config.js
+7
-0
constants.js
specs/jest_helpers/constants.js
+0
-0
pdf_snapshot.js
specs/jest_helpers/pdf_snapshot.js
+0
-0
puppeteer_environment.js
specs/jest_helpers/puppeteer_environment.js
+1
-1
setup.js
specs/jest_helpers/setup.js
+1
-1
setup_tests.js
specs/jest_helpers/setup_tests.js
+0
-0
teardown.js
specs/jest_helpers/teardown.js
+0
-0
jest.config.js
tests/jest.config.js
+3
-0
No files found.
jest.config.js
deleted
100755 → 0
View file @
7233c8be
module
.
exports
=
{
globalSetup
:
'
./jest/setup.js
'
,
globalTeardown
:
'
./jest/teardown.js
'
,
testEnvironment
:
'
./jest/puppeteer_environment.js
'
,
setupTestFrameworkScriptFile
:
'
./jest/setup_tests.js
'
}
package.json
View file @
82ffbf9d
...
...
@@ -35,7 +35,8 @@
"scripts"
:
{
"build"
:
"./node_modules/.bin/rollup -c"
,
"start"
:
"./node_modules/.bin/rollup -w -c rollup.server.config.js"
,
"test"
:
"jest"
,
"test"
:
"jest --config=test/jest.config.js"
,
"specs"
:
"jest --config=specs/jest.config.js"
,
"compile"
:
"./node_modules/.bin/babel src/ -d lib/"
,
"pretest"
:
"npm run build"
,
"prepare"
:
"npm run build && npm run compile"
,
...
...
tests/
specs/default/__image_snapshots__/default-test-js-break-should-create-a-pdf-1-snap.png
→
specs/default/__image_snapshots__/default-test-js-break-should-create-a-pdf-1-snap.png
View file @
82ffbf9d
File moved
tests/
specs/default/default.html
→
specs/default/default.html
View file @
82ffbf9d
File moved
tests/
specs/default/default.test.js
→
specs/default/default.test.js
View file @
82ffbf9d
File moved
specs/jest.config.js
0 → 100755
View file @
82ffbf9d
module
.
exports
=
{
testMatch
:
[
'
**/?(*.)(spec|test).js?(x)
'
],
globalSetup
:
'
./jest_helpers/setup.js
'
,
globalTeardown
:
'
./jest_helpers/teardown.js
'
,
testEnvironment
:
'
./jest_helpers/puppeteer_environment.js
'
,
setupTestFrameworkScriptFile
:
'
./jest_helpers/setup_tests.js
'
}
jest
/constants.js
→
specs/jest_helpers
/constants.js
View file @
82ffbf9d
File moved
jest
/pdf_snapshot.js
→
specs/jest_helpers
/pdf_snapshot.js
View file @
82ffbf9d
File moved
jest
/puppeteer_environment.js
→
specs/jest_helpers
/puppeteer_environment.js
View file @
82ffbf9d
...
...
@@ -58,7 +58,7 @@ class PuppeteerEnvironment extends NodeEnvironment {
renderedResolve
(
msg
,
width
,
height
,
orientation
);
});
await
page
.
goto
(
ORIGIN
+
'
/
tests/
specs/
'
+
path
,
{
waitUntil
:
'
networkidle2
'
});
await
page
.
goto
(
ORIGIN
+
'
/specs/
'
+
path
,
{
waitUntil
:
'
networkidle2
'
});
return
page
;
}
...
...
jest
/setup.js
→
specs/jest_helpers
/setup.js
View file @
82ffbf9d
...
...
@@ -13,7 +13,7 @@ const { WS_ENDPOINT_PATH, DIR, DEBUG, CI, PORT } = require('./constants');
module
.
exports
=
async
function
()
{
DEBUG
&&
console
.
log
(
chalk
.
green
(
'
Starting Static Server
\n
'
));
app
.
use
(
express
.
static
(
path
.
join
(
__dirname
,
'
../
'
)));
app
.
use
(
express
.
static
(
path
.
join
(
__dirname
,
'
../
../
'
)));
const
server
=
app
.
listen
(
PORT
);
global
.
server
=
server
;
global
.
origin
=
`http://localhost:
${
PORT
}
`
;
...
...
jest
/setup_tests.js
→
specs/jest_helpers
/setup_tests.js
View file @
82ffbf9d
File moved
jest
/teardown.js
→
specs/jest_helpers
/teardown.js
View file @
82ffbf9d
File moved
tests/jest.config.js
0 → 100644
View file @
82ffbf9d
module
.
exports
=
{
testMatch
:
[
'
tests/**/?(*.)(spec|test).js?(x)
'
],
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment