1
0
mirror of https://github.com/qntm/base65536 synced 2025-10-05 19:34:42 +02:00

Compare commits

...

2 Commits

Author SHA1 Message Date
qntm
586b131017
Update workflow-1.yml (#105) 2025-07-22 14:45:55 +01:00
qntm
174dd1d05a
Why do I have front-end tests? (#104) 2025-07-22 14:27:49 +01:00
7 changed files with 4 additions and 4115 deletions

View File

@ -11,7 +11,7 @@ jobs:
strategy: strategy:
matrix: matrix:
node-version: ['20.x', '22.x'] node-version: ['20.x', '22.x', '24.x']
steps: steps:
- uses: 'actions/checkout@v2' - uses: 'actions/checkout@v2'

View File

@ -1,11 +0,0 @@
import { defineConfig } from 'cypress'
export default defineConfig({
fixturesFolder: false,
screenshotOnRunFailure: false,
video: false,
e2e: {
setupNodeEvents (on, config) {},
supportFile: false
}
})

View File

@ -1,8 +0,0 @@
/* global describe, it, cy */
describe('base65536 in the browser', () => {
it('works', () => {
cy.visit('http://localhost:3000/server/index.html')
cy.contains('what the heck is up')
})
})

4065
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -11,12 +11,11 @@
"main": "src/index.js", "main": "src/index.js",
"types": "typings/index.d.ts", "types": "typings/index.d.ts",
"scripts": { "scripts": {
"cypress": "start-server-and-test \"node server/server.js\" http://localhost:3000/server/index.html \"cypress run\"",
"mocha": "c8 --100 mocha", "mocha": "c8 --100 mocha",
"standard": "standard", "standard": "standard",
"tag": "node -e \"require('child_process').spawn('git', ['tag', `v${require('./package.json').version}`], { stdio: 'inherit' })\"", "tag": "node -e \"require('child_process').spawn('git', ['tag', `v${require('./package.json').version}`], { stdio: 'inherit' })\"",
"tag-and-publish": "npm run tag && git push --tags && npm publish && npm version patch --no-git-tag-version && git add . && git commit -m \"Bump patch\" && git push", "tag-and-publish": "npm run tag && git push --tags && npm publish && npm version patch --no-git-tag-version && git add . && git commit -m \"Bump patch\" && git push",
"test": "npm run standard && npm run mocha && npm run cypress" "test": "npm run standard && npm run mocha"
}, },
"keywords": [ "keywords": [
"base64", "base64",
@ -31,13 +30,10 @@
"devDependencies": { "devDependencies": {
"base65536-test": "^1.1.2", "base65536-test": "^1.1.2",
"c8": "^10.1.2", "c8": "^10.1.2",
"cypress": "^14.1.0",
"express": "^4.17.1",
"glob": "^11.0.2", "glob": "^11.0.2",
"mocha": "^11.0.0", "mocha": "^11.0.0",
"safe-code-point": "^3.0.2", "safe-code-point": "^3.0.2",
"standard": "^17.0.0", "standard": "^17.0.0"
"start-server-and-test": "^2.0.0"
}, },
"files": [ "files": [
"src", "src",

View File

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Base65536</title>
<script type="module">
import { encode, decode } from '../src/index.js'
const encoded = encode(new TextEncoder('utf-8').encode('what the heck is up'))
const uint8Array = new Uint8Array([119, 104, 97, 116, 32, 116, 104, 101, 32, 104, 101, 99, 107, 32, 105, 115, 32, 117, 112])
console.log(encode(uint8Array))
const decoded = new TextDecoder('utf-8').decode(decode(encoded))
document.querySelector('.root').appendChild(document.createTextNode(decoded))
</script>
</head>
<body>
<div class="root"></div>
</body>
</html>

View File

@ -1,7 +0,0 @@
import express from 'express'
const app = express()
app.use(express.static('.'))
app.listen(3000, () => {
console.log('listening')
})