Skip to content

Commit

Permalink
test: add basic test
Browse files Browse the repository at this point in the history
  • Loading branch information
suryarajendhran committed Jul 25, 2024
1 parent b5416f3 commit 8917ab5
Show file tree
Hide file tree
Showing 4 changed files with 5,321 additions and 118 deletions.
11 changes: 11 additions & 0 deletions extensions/checkout-ui/__tests__/Checkout.test.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { mount } from '@remote-ui/testing'
import { createRoot } from '@remote-ui/react'
import Checkout from '../src/Checkout'

describe('Header', () => {
it('renders the header', () => {
const app = mount((root) => {
createRoot(root).render(<Checkout />)
})
})
})
7 changes: 7 additions & 0 deletions extensions/checkout-ui/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
presets: [
'@babel/preset-env',
['@babel/preset-react', {runtime: 'automatic'}],
"@babel/preset-typescript",
],
};
19 changes: 15 additions & 4 deletions extensions/checkout-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,24 @@
"private": true,
"version": "1.0.0",
"license": "UNLICENSED",
"scripts": {
"test": "jest"
},
"dependencies": {
"react": "^18.0.0",
"@shopify/ui-extensions": "2024.7.x",
"@shopify/ui-extensions-react": "2024.7.x"
"@shopify/ui-extensions-react": "2024.7.x",
"react": "^18.0.0"
},
"devDependencies": {
"@babel/preset-env": "^7.24.8",
"@babel/preset-react": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@remote-ui/testing": "^1.4.3",
"@types/jest": "^29.5.12",
"@types/react": "^18.0.0",
"react-reconciler": "0.29.0"
"babel-jest": "^29.7.0",
"jest": "^29.7.0",
"react-reconciler": "0.29.0",
"react-test-renderer": "^18.3.1"
}
}
}
Loading

0 comments on commit 8917ab5

Please sign in to comment.