Skip to content

Commit

Permalink
Fixed the test and the lint-staged command
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianfish committed Mar 21, 2024
1 parent 1b0fe65 commit cdfb529
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion serviceworker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.sakaiproject</groupId>
<artifactId>master</artifactId>
<version>24-SNAPSHOT</version>
<version>25-SNAPSHOT</version>
<relativePath>../master/pom.xml</relativePath>
</parent>

Expand Down
1 change: 1 addition & 0 deletions webcomponents/tool/src/main/frontend/package-lock.json

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

4 changes: 2 additions & 2 deletions webcomponents/tool/src/main/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
},
"lint-staged": {
"**/packages/**/src/*.js": [
"eslint --fix",
"lit-analyzer --rules.no-incompatible-type-binding off --rules.no-nullable-attribute-binding off"
"npx eslint --fix",
"npx lit-analyzer --rules.no-incompatible-type-binding off --rules.no-nullable-attribute-binding off"
]
},
"keywords": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"fetch-mock": "^9.11.0"
},
"dependencies": {
"@sakai-ui/sakai-portal-utils": "file:../sakai-portal-utils",
"get-browser-fingerprint": "^3.2.0",
"lit": "^3.1.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const setupServiceWorkerListener = () => {
navigator.serviceWorker.addEventListener("message", serviceWorkerMessageListener);
};

export const checkUserChangedThenSet = userId => {
const checkUserChangedThenSet = userId => {

if (!userId) return false;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
import { setup } from '../src/sakai-push-utils.js';
//import { expect } from '@open-wc/testing';
//import fetchMock from "fetch-mock/esm/client";
import { pushSetupComplete } from '../src/sakai-push-utils.js';

describe("sakai-push-utils tests", () => {

window.top.portal = { locale: 'en_GB' };

/*
fetchMock
.get(data.i18nUrl, data.i18n, { overwriteRoutes: true })
.get("*", 500, { overwriteRoutes: true });
*/

it ("sets up uccessfully", async () => {
setup.then(() => console.log("setup complete"));
pushSetupComplete.then(() => console.log("push setup complete"));
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
/** Test files to run */
files: 'test/**/*.test.js',

rootDir: '../../',

/** Resolve bare module imports */
nodeResolve: {
exportConditions: ['browser', 'development'],
Expand Down

0 comments on commit cdfb529

Please sign in to comment.