Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add editProfile pane #55

Merged
merged 20 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
node-version: [ 16.x, 18.x ]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
Expand All @@ -31,7 +31,7 @@ jobs:
- run: npm run build --if-present
- name: Save build
if: matrix.node-version == '16.x'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: build
path: |
Expand All @@ -43,7 +43,7 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: build
- uses: actions/setup-node@v1
Expand All @@ -64,7 +64,7 @@ jobs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: build
- uses: actions/setup-node@v1
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# Wrap ttext files in js as text load is broken

src/editProfilePane/wrapped-profileFormText.ts : src/editProfilePane/profileFormText.ttl
echo "export const profileFormText = \`" > $@
cat src/editProfilePane/profileFormText.ttl >> $@
echo '` ;' >> $@
3 changes: 3 additions & 0 deletions __mocks__/fileMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

module.exports = '// mocked-file-content';

4 changes: 4 additions & 0 deletions declarations.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module '*.ttl' {
const content: string;
export default content;
}
6 changes: 5 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ module.exports = {
transformIgnorePatterns: ["/node_modules/(?!lit-html).+\\.js"],
testEnvironmentOptions: {
customExportConditions: ['node']
}
},
moduleNameMapper: {
'^[./a-zA-Z0-9$_-]+\\.ttl$': '<rootDir>/__mocks__/fileMock.js', // '\\.ttl$'
},

};
6 changes: 6 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import "@testing-library/jest-dom";
import fetchMock from "jest-fetch-mock";
import { Buffer } from 'buffer' // https://stackoverflow.com/questions/68707553/uncaught-referenceerror-buffer-is-not-defined
const { TextEncoder, TextDecoder } = require('util')

global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder

fetchMock.enableMocks();

// Added 2024-09

global.Buffer = Buffer

Loading
Loading