Skip to content

Commit 8011058

Browse files
committed
tests: update integration tests
1 parent f391d6f commit 8011058

File tree

3 files changed

+2
-84
lines changed

3 files changed

+2
-84
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"test:unit": "MOCK_FETCH=true jest ./tests/unit",
7575
"test:unit:watch": "MOCK_FETCH=true jest ./tests/unit --watch",
7676
"test:integration": " jest ./tests/integration/",
77-
"test:integration:watch": "TYPEFORM_TOKEN=$TYPEFORM_TOKEN jest ./tests/integration/ --watch",
77+
"test:integration:watch": "jest ./tests/integration/ --watch",
7878
"build:dist": "webpack --mode production",
7979
"build:lib": "NODE_ENV=production babel src --out-dir lib",
8080
"prepublish": "in-publish && npm run build:dist && npm run build:lib || not-in-publish",

tests/integration/db.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
"fields": []
1212
}
1313
]
14-
}
14+
}

tests/integration/forms.test.js

-82
Original file line numberDiff line numberDiff line change
@@ -36,85 +36,3 @@ test('Gets the correct form by UID', done => {
3636
done()
3737
})
3838
})
39-
40-
// test('Update only title of typeform', done => {
41-
// const newTitle = 'integration test - ' + randomString()
42-
// typeformClient.forms
43-
// .update({
44-
// uid: testTypeform,
45-
// data: [
46-
// {
47-
// op: 'replace',
48-
// path: '/title',
49-
// value: newTitle
50-
// }
51-
// ]
52-
// })
53-
// .then(response => {
54-
// const { data, status } = response
55-
56-
// expect(status).toBe(204)
57-
// done()
58-
// })
59-
// })
60-
61-
// test('Replaces the title sending the form schema', done => {
62-
// const newTitle = 'integration test - ' + randomString()
63-
// typeformClient.forms
64-
// .update({
65-
// uid: testTypeform,
66-
// override: true,
67-
// data: {
68-
// title: newTitle,
69-
// theme: {
70-
// href: 'https://api.typeform.com/themes/6lPNE6'
71-
// }
72-
// }
73-
// })
74-
// .then(response => {
75-
// const { data, status } = response
76-
77-
// expect(status).toBe(200)
78-
// expect(data.title).toBe(newTitle)
79-
// done()
80-
// })
81-
// })
82-
83-
// let formUId
84-
// test('Create a form', done => {
85-
// const newTitle = randomString()
86-
87-
// typeformClient.forms
88-
// .create({
89-
// data: {
90-
// title: newTitle,
91-
// theme: {
92-
// href: 'https://api.typeform.com/themes/6lPNE6'
93-
// }
94-
// }
95-
// })
96-
// .then(response => {
97-
// const { data, status } = response
98-
99-
// expect(status).toBe(201)
100-
// expect(data.title).toBe(newTitle)
101-
// formUId = data.id
102-
103-
// done()
104-
// })
105-
// })
106-
107-
// test('Delete created form', done => {
108-
// const newTitle = randomString()
109-
110-
// typeformClient.forms
111-
// .delete({
112-
// uid: formUId
113-
// })
114-
// .then(response => {
115-
// const { status } = response
116-
117-
// expect(status).toBe(204)
118-
// done()
119-
// })
120-
// })

0 commit comments

Comments
 (0)