Loading files
5369e47efThis file is pinned to the selected release. Download the original to open it in your design tool.
Files from this revision, including CAD and LFS contents. Git history is not included.
Or in GitHub Desktop, choose File → Clone repository → URL and paste this address.
Public repositories can be cloned without signing in. For pushing, use your ThingAtlas username and a Git access token as the password.
git lfs install git clone https://thingatlas.com/git/-unclaimed/stack-chan-374381865.git
Includes Git history, branches, and Git LFS files. Clones the repository’s default branch, regardless of the version shown here.
5369e47efThis file is pinned to the selected release. Download the original to open it in your design tool.
import assert from 'node:assert/strict'
import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { test } from 'node:test'
const firmwareRoot = process.cwd()
function read(path) {
return readFileSync(resolve(firmwareRoot, path), 'utf8')
}
test('firmware exposes a console MOD receiver that writes only the xs partition', () => {
const receiver = read('stackchan/services/mod-transfer/mod-transfer-cli.js')
const manifest = read('stackchan/manifest.json')
assert.match(receiver, /CLI\.install/)
assert.match(receiver, /PARTITION_NAME = 'xs'/)
assert.match(receiver, /new Flash\(PARTITION_NAME\)/)
assert.match(receiver, /MODX /)
assert.match(receiver, /case 'hello'/)
assert.match(receiver, /case 'chunk'/)
assert.match(receiver, /case 'commit'/)
assert.doesNotMatch(receiver, /partitionOffset/)
assert.match(manifest, /mod-transfer-cli/)
assert.match(manifest, /base\/console\/console/)
assert.match(manifest, /files\/flash\/manifest\.json/)
})