File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 runs-on : ubuntu-latest
66 steps :
77 - uses : actions/checkout@v2
8- - name : Use Node.js
8+ - name : Use Node.js 18.x
99 uses : actions/setup-node@v1
1010 with :
11- node-version : ' 14.x'
12- - run : npm install
13- - run : npm run build --if-present
14- - run : npm test
11+ node-version : 18.x
12+ - name : npm install, build, and test
13+ run : |
14+ npm install
15+ npm run build --if-present
16+ npm test
1517 env :
1618 CI : true
19+
Original file line number Diff line number Diff line change 1111 - uses : actions/checkout@v3
1212 - uses : actions/setup-node@v3
1313 with :
14- node-version : 14
14+ node-version : 18
1515 registry-url : https://registry.npmjs.org/
1616 cache : npm
1717 - run : npm ci
2121 TAG_NAME : ${{ github.event.release.tag_name }}
2222 - run : npm whoami; npm --ignore-scripts publish
2323 env :
24- NODE_AUTH_TOKEN : ${{secrets.npm_token}}
24+ NODE_AUTH_TOKEN : ${{secrets.npm_token}}
Original file line number Diff line number Diff line change 1616 "prebuild" : " npm run clean && npm run lint && npm run compile" ,
1717 "compile" : " tsc" ,
1818 "build" : " rollup -c" ,
19- "pretest" : " npm run build" ,
2019 "test" : " vitest run" ,
2120 "test:watch" : " vitest" ,
2221 "test:legacy" : " karma start karma.config.js" ,
Original file line number Diff line number Diff line change 1- import { vi } from 'vitest'
21import FileAttachmentElement from '../src/file-attachment-element'
32
43// Define a global CustomEvent class if not already available
@@ -13,7 +12,7 @@ if (typeof window.CustomEvent !== 'function') {
1312}
1413
1514// Register the custom element before running tests
16- customElements . define ( 'file-attachment' , FileAttachmentElement )
15+ customElements . get ( 'file-attachment' ) || customElements . define ( 'file-attachment' , FileAttachmentElement )
1716
1817// Mock window.FileAttachmentElement for element creation tests
1918Object . defineProperty ( window , 'FileAttachmentElement' , {
You can’t perform that action at this time.
0 commit comments