Skip to content

Commit 11b67c3

Browse files
committed
add circleci 2.0 config
- 🔪 plotly-graph-exporter stdout msg test (for now, this fails on CI)
1 parent f8708a2 commit 11b67c3

File tree

2 files changed

+33
-21
lines changed

2 files changed

+33
-21
lines changed

.circleci/config.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: 2
2+
3+
jobs:
4+
build:
5+
docker:
6+
# see https://circleci.com/docs/2.0/circleci-images/
7+
# use '-browsers' version to have access to xvfb wrappers
8+
- image: circleci/node:6.10.3-browsers
9+
10+
steps:
11+
- checkout
12+
13+
# Download and cache dependencies
14+
- restore_cache:
15+
keys:
16+
- v1-dependencies-{{ checksum "package.json" }}
17+
# fallback to using the latest cache if no exact match is found
18+
- v1-dependencies-
19+
20+
- run: npm install
21+
22+
- save_cache:
23+
paths:
24+
- node_modules
25+
key: v1-dependencies-{{ checksum "package.json" }}
26+
27+
# install pdftops
28+
- run: sudo apt-get install poppler-utils
29+
30+
- run: npm test
31+
32+
- store_artifacts:
33+
path: build

test/integration/plotly-graph-exporter_test.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,3 @@ tap.test('should print help message', t => {
5252

5353
t.end()
5454
})
55-
56-
tap.test('should print export info on success', t => {
57-
const input = '{"data":[{"y":[1,2,1]}],"layout":{"title":"tester"}}'
58-
const subprocess = _spawn(t, input)
59-
60-
const matches = [
61-
/^exported fig/,
62-
/done with code 0/
63-
]
64-
65-
let i = 0
66-
67-
subprocess.stdout.on('data', d => {
68-
t.match(d.toString(), matches[i], `msg ${i}`)
69-
i++
70-
})
71-
72-
subprocess.stderr.on('data', d => {
73-
t.fail(d, 'unwanted msg to stderr')
74-
})
75-
})

0 commit comments

Comments
 (0)