Skip to content

Commit

Permalink
test: update tests
Browse files Browse the repository at this point in the history
Jira-issue: https://jira.schibsted.io/browse/UUI-766
Type: feat
ref: UUI-766
  • Loading branch information
hunger-programmer committed Jan 19, 2024
1 parent de6161e commit b5fe3e8
Show file tree
Hide file tree
Showing 40 changed files with 46 additions and 44 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2018 Schibsted Products & Technology AS
Copyright (c) 2024 Schibsted Products & Technology AS

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
Expand Down
3 changes: 1 addition & 2 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#########################################################
# #
# Schibsted account SDK for browsers #
# Copyright (c) 2018 Schibsted Products & Technology AS #
# Copyright (c) 2024 Schibsted Products & Technology AS #
# #
#########################################################

Expand All @@ -16,4 +16,3 @@ fetch-jsonp
tiny-emitter
LICENSE: MIT,
https://github.com/scottcorgan/tiny-emitter/blob/master/LICENSE

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ and push.

## LICENSE

Copyright (c) 2018 Schibsted Products & Technology AS
Copyright (c) 2024 Schibsted Products & Technology AS

Licensed under the [MIT
License](https://github.com/schibsted/account-sdk-browser/blob/master/LICENSE.md)
Expand Down
2 changes: 1 addition & 1 deletion __tests__/RESTClient.intest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion __tests__/RESTClient.utest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion __tests__/SDKError.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion __tests__/cache.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
9 changes: 6 additions & 3 deletions __tests__/identity.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down Expand Up @@ -462,8 +462,11 @@ describe('Identity', () => {

await expect(identity.hasSession()).rejects.toMatchObject({ message: 'HasSession failed' });

expect(identity._sessionService.fetch.mock.calls.length).toBe(1);
expect(identity._sessionService.fetch.mock.calls[0][0]).toMatch(/^http:\/\/id.foo.com\/session/);
expect(getSessionMock).toHaveBeenCalledTimes(1)
expect(getSessionMock).toHaveBeenCalledWith(
expect.stringMatching(/^http:\/\/id\.foo\.com\/session/),
{"credentials": "include", "headers": {}, "method": "get"}
)
});

test('should fail `hasSession` if session cookie is present but no session is found and site does not have specific logout', async () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/monetization.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion __tests__/object.utest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion __tests__/payment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion __tests__/spidTalk.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion __tests__/testutils.utest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion __tests__/url.utest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion __tests__/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion __tests__/validate.utest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion identity.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion monetization.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@schibsted/account-sdk-browser",
"version": "4.8.5",
"version": "4.8.7",
"description": "Schibsted account SDK for browsers",
"main": "index.js",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion payment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/RESTClient.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/SDKError.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/cache.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/es5/global.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/es5/identity.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/es5/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/es5/monetization.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/es5/payment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/identity.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/monetization.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/object.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/payment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/popup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/spidTalk.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/url.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/validate.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
* See LICENSE.md in the project root.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Automatically generated in 'npm version' by scripts/genversion.js

'use strict'
const version = '4.8.5';
const version = '4.8.7';
export default version;

0 comments on commit b5fe3e8

Please sign in to comment.