Skip to content

Commit e61a0fe

Browse files
committed
fixed the endsWith
1 parent dcfee14 commit e61a0fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

specs/BreinifyUser-spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('BreinifyUser', function () {
2727
var all = user.all();
2828

2929
//noinspection JSUnresolvedFunction,JSUnresolvedVariable
30-
expect(all.additional.userAgent).to.endsWith('PhantomJS/2.1.1 Safari/538.1');
30+
expect(all.additional.userAgent).toMatch('.*PhantomJS/2.1.1 Safari/538.1$');
3131
//noinspection JSUnresolvedFunction,JSUnresolvedVariable
3232
expect(all.additional.url).toMatch('.*/_SpecRunner.html');
3333

@@ -111,7 +111,7 @@ describe('BreinifyUser', function () {
111111

112112
user.add('userAgent', navigator.userAgent);
113113
//noinspection JSUnresolvedFunction,JSUnresolvedVariable
114-
expect(user.all().additional.userAgent).to.endsWith('PhantomJS/2.1.1 Safari/538.1');
114+
expect(user.all().additional.userAgent).toMatch('.*PhantomJS/2.1.1 Safari/538.1$');;
115115
//noinspection JSUnresolvedFunction,JSUnresolvedVariable
116116
expect(user.all().additional.location).toBeUndefined();
117117

@@ -121,7 +121,7 @@ describe('BreinifyUser', function () {
121121
};
122122
user.add('location', loc);
123123
//noinspection JSUnresolvedFunction,JSUnresolvedVariable
124-
expect(user.all().additional.userAgent).to.endsWith('PhantomJS/2.1.1 Safari/538.1');
124+
expect(user.all().additional.userAgent).toMatch('.*PhantomJS/2.1.1 Safari/538.1$');;
125125
//noinspection JSUnresolvedFunction,JSUnresolvedVariable
126126
expect(user.all().additional.location).toEqual(loc);
127127

0 commit comments

Comments
 (0)