Skip to content

Commit 0ef13a7

Browse files
committed
fix tests
1 parent 909d41c commit 0ef13a7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ describe('session-resume', function () {
66
// eslint-disable-next-line github/no-inner-html
77
document.body.innerHTML = `
88
<form>
9-
<input id="my-first-field" value="first-field-value" class="js-session-resumable" />
10-
<input id="my-second-field" value="second-field-value" class="js-session-resumable" />
9+
<input id="my-first-field" type="text" value="first-field-value" class="js-session-resumable" />
10+
<input id="my-second-field" type="text" value="second-field-value" class="js-session-resumable" />
1111
<input id="my-first-checkbox" type="checkbox" value="first-checkbox-value" class="js-session-resumable" />
1212
<input id="my-second-checkbox" type="checkbox" value="second-checkbox-value" class="js-session-resumable" />
1313
<input id="my-checked-checkbox" type="checkbox" value="checked-checkbox-value" class="js-session-resumable" checked />
@@ -129,7 +129,7 @@ describe('session-resume', function () {
129129
document.querySelector('#my-second-field').value = 'test2'
130130
persistResumableFields('test-persist')
131131

132-
assert.deepEqual(JSON.parse(sessionStorage.getItem('session-resume:test-persist')), [
132+
assert.includeDeepMembers(JSON.parse(sessionStorage.getItem('session-resume:test-persist')), [
133133
['my-first-field', 'test1'],
134134
['my-second-field', 'test2']
135135
])
@@ -151,7 +151,7 @@ describe('session-resume', function () {
151151

152152
persistResumableFields('test-persist', {storage: fakeStorage})
153153

154-
assert.deepEqual(JSON.parse(fakeStorage.getItem('session-resume:test-persist')), [
154+
assert.includeDeepMembers(JSON.parse(fakeStorage.getItem('session-resume:test-persist')), [
155155
['my-first-field', 'test1'],
156156
['my-second-field', 'test2']
157157
])
@@ -164,7 +164,7 @@ describe('session-resume', function () {
164164

165165
persistResumableFields('test-persist')
166166

167-
assert.deepEqual(JSON.parse(sessionStorage.getItem('session-resume:test-persist')), [
167+
assert.includeDeepMembers(JSON.parse(sessionStorage.getItem('session-resume:test-persist')), [
168168
['my-first-field', 'test1'],
169169
['my-second-field', 'test2'],
170170
['non-existant-field', 'test3']
@@ -178,7 +178,7 @@ describe('session-resume', function () {
178178

179179
persistResumableFields('test-persist')
180180

181-
assert.deepEqual(JSON.parse(sessionStorage.getItem('session-resume:test-persist')), [
181+
assert.includeDeepMembers(JSON.parse(sessionStorage.getItem('session-resume:test-persist')), [
182182
['my-first-field', 'test1'],
183183
['my-second-field', 'test2']
184184
])

0 commit comments

Comments
 (0)