Skip to content

Commit

Permalink
Added browser compatibility test
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardudycz committed Oct 25, 2024
1 parent 3325746 commit 7566bf1
Show file tree
Hide file tree
Showing 5 changed files with 1,304 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,23 @@ jobs:
else
echo "No errors found, proceeding..."
fi
# - name: Use Emmett shims in the browser compatibility test project
# working-directory: ./src/e2e/browser
# run: npm install ${{ env.PACKAGE_FILENAME_SHIMS }}

# - name: Use Emmett in the browser compatibility test project
# working-directory: ./src/e2e/browser
# run: npm install ${{ env.PACKAGE_FILENAME }}

- name: Install packages in the browser compatibility test project
working-directory: ./src/e2e/browser
run: npm install

- name: Install Playwright chromium browser
working-directory: ./src/e2e/browser
run: npx playwright install chromium

- name: Run browser compatibility test project
working-directory: ./src/e2e/browser
run: npm test
29 changes: 29 additions & 0 deletions src/e2e/browser/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Browser Compatibility Test</title>
<!-- Import map to remap "uuid" to a CDN URL -->
<script type="importmap">
{
"imports": {
"uuid": "https://cdn.skypack.dev/uuid",
"web-streams-polyfill": "https://unpkg.com/web-streams-polyfill/dist/ponyfill.mjs",
"async-retry": "https://esm.sh/async-retry",
"@event-driven-io/emmett": "./node_modules/@event-driven-io/emmett/dist/index.js"
}
}
</script>
</head>
<body>
<!-- Load the bundled file -->
<!-- <script src="./node_modules/@event-driven-io/emmett/dist/index.js"></script> -->

<!-- Test script -->
<script type="module">
import { getInMemoryEventStore } from '@event-driven-io/emmett';

window.eventStore = getInMemoryEventStore();
</script>
</body>
</html>
Loading

0 comments on commit 7566bf1

Please sign in to comment.