diff --git a/lib/tests/authComponent.test.js b/lib/tests/authComponent.test.js index 35c799e..e8b6f0e 100644 --- a/lib/tests/authComponent.test.js +++ b/lib/tests/authComponent.test.js @@ -1,3 +1,21 @@ +/** + * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + import React from "react"; import { render, screen } from "@testing-library/react"; import { AuthenticatedComponent } from "../src/authenticated-component.tsx"; diff --git a/lib/tests/getUserInfo.test.js b/lib/tests/getUserInfo.test.js index d3e3bbe..f455178 100644 --- a/lib/tests/getUserInfo.test.js +++ b/lib/tests/getUserInfo.test.js @@ -1,3 +1,22 @@ +/** + * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + // Import the necessary modules import AuthAPI from '../src/api'; // Adjust the path as needed import { AsgardeoSPAClient } from '@asgardeo/auth-spa'; // Adjust the path as needed diff --git a/lib/tests/isAuth.test.js b/lib/tests/isAuth.test.js index 263f805..c3d7f25 100644 --- a/lib/tests/isAuth.test.js +++ b/lib/tests/isAuth.test.js @@ -1,3 +1,22 @@ +/** + * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + import AuthAPI from '../src/api'; // Adjust import if needed describe('AuthAPI isAuthenticated()', () => { diff --git a/lib/tests/refreshAccessToken.test.js b/lib/tests/refreshAccessToken.test.js index 6fb6b0a..6383a85 100644 --- a/lib/tests/refreshAccessToken.test.js +++ b/lib/tests/refreshAccessToken.test.js @@ -1,3 +1,21 @@ +/** + * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + // Import necessary modules import AuthAPI from '../src/api'; // Adjust the path as needed import { AsgardeoSPAClient } from '@asgardeo/auth-spa'; // Adjust the path as needed diff --git a/lib/tests/secureApp.test.js b/lib/tests/secureApp.test.js index 5c76824..2f0d94c 100644 --- a/lib/tests/secureApp.test.js +++ b/lib/tests/secureApp.test.js @@ -1,3 +1,22 @@ +/** + * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + import React from "react"; import "@testing-library/jest-dom"; import { render, screen, waitFor } from "@testing-library/react"; diff --git a/lib/tests/signIn.test.js b/lib/tests/signIn.test.js index dd333ca..eb2e35e 100644 --- a/lib/tests/signIn.test.js +++ b/lib/tests/signIn.test.js @@ -1,3 +1,22 @@ +/** + * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + jest.mock('@asgardeo/auth-spa'); // Import necessary dependencies diff --git a/lib/tests/signOut.test.js b/lib/tests/signOut.test.js index c1648bc..8a20a86 100644 --- a/lib/tests/signOut.test.js +++ b/lib/tests/signOut.test.js @@ -1,3 +1,21 @@ +/** + * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + const mockClientInstance = { signOut: mockSignOut }; jest.mock('@asgardeo/auth-spa', () => ({ AsgardeoSPAClient: { diff --git a/lib/tests/useAuthContext.test.js b/lib/tests/useAuthContext.test.js index ade02ce..4763d5f 100644 --- a/lib/tests/useAuthContext.test.js +++ b/lib/tests/useAuthContext.test.js @@ -1,3 +1,21 @@ +/** + * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + import React from "react"; import { render, screen } from "@testing-library/react"; import { AuthenticatedComponent } from "../src/authenticated-component";