Skip to content

Commit b9161cb

Browse files
committed
RI-6508: clean up compareConsents test params
1 parent 26ec25f commit b9161cb

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

src/webviews/src/utils/comparisons/tests/compareConsents.spec.ts

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -79,43 +79,43 @@ describe('compareConsents: custom keytar encryption conditions', () => {
7979
},
8080
}
8181

82-
const agreements1 = {
83-
eula: true,
84-
encryption: false,
85-
version: '1.0.6',
86-
}
87-
88-
const agreements2 = {
89-
eula: true,
90-
encryption: false,
91-
version: '1.0.7',
92-
}
93-
94-
const agreements3 = {
95-
eula: true,
96-
encryption: true,
97-
version: '1.0.6',
98-
}
99-
100-
const agreements4 = {
101-
eula: true,
102-
encryption: true,
103-
version: '1.0.7',
104-
}
105-
10682
it('should prompt users with encryption set to false and v1.0.6 to set encryption again', () => {
107-
expect(compareConsents(agreementsSpec, agreements1)).toHaveLength(1)
83+
const agreements = {
84+
eula: true,
85+
encryption: false,
86+
version: '1.0.6',
87+
}
88+
89+
expect(compareConsents(agreementsSpec, agreements)).toHaveLength(1)
10890
})
10991

11092
it('should NOT prompt users with encryption set to false and v1.0.7 to set encryption again', () => {
111-
expect(compareConsents(agreementsSpec, agreements2)).toHaveLength(0)
93+
const agreements = {
94+
eula: true,
95+
encryption: false,
96+
version: '1.0.7',
97+
}
98+
99+
expect(compareConsents(agreementsSpec, agreements)).toHaveLength(0)
112100
})
113101

114102
it('should NOT prompt users with encryption set to true and v1.0.6 to set encryption again', () => {
115-
expect(compareConsents(agreementsSpec, agreements3)).toHaveLength(0)
103+
const agreements = {
104+
eula: true,
105+
encryption: true,
106+
version: '1.0.6',
107+
}
108+
109+
expect(compareConsents(agreementsSpec, agreements)).toHaveLength(0)
116110
})
117111

118112
it('should NOT prompt users with encryption set to true and v1.0.7 to set encryption again', () => {
119-
expect(compareConsents(agreementsSpec, agreements4)).toHaveLength(0)
113+
const agreements = {
114+
eula: true,
115+
encryption: true,
116+
version: '1.0.7',
117+
}
118+
119+
expect(compareConsents(agreementsSpec, agreements)).toHaveLength(0)
120120
})
121121
})

0 commit comments

Comments
 (0)