Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
justjake committed Dec 9, 2023
1 parent e891156 commit 3648b45
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
## v0.24.0

- [#127](https://github.com/justjake/quickjs-emscripten/pull/127) Upgrade to quickjs 2023-12-09:

- added Object.hasOwn, {String|Array|TypedArray}.prototype.at, {Array|TypedArray}.prototype.findLast{Index}
- BigInt support is enabled even if CONFIG_BIGNUM disabled
- updated to Unicode 15.0.0
- misc bug fixes

- [#125](https://github.com/justjake/quickjs-emscripten/pull/125) (thanks to @tbrockman):

- Synchronizes quickjs to include the recent commit to address CVE-2023-31922.

- [#111](https://github.com/justjake/quickjs-emscripten/pull/111) (thanks to @yourWaifu) ArrayBuffer and binary json encoding:
Expand Down
15 changes: 10 additions & 5 deletions ts/quickjs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ function asyncContextTests(getContext: () => Promise<QuickJSAsyncContext>) {
it("is enough to support at least 20 levels of function nesting", async () => {
// The nesting levels of the test cannot be too high, otherwise the
// node.js call stack will overflow when executing `yarn test`
const buildName = isBuildDebug(vm) ? 'debug' : 'release'
const buildName = isBuildDebug(vm) ? "debug" : "release"
const EXPECTED_NESTING_LEVEL = isBuildDebug(vm) ? 19 : 20

let asyncFunctionCalls = 0
Expand All @@ -1001,8 +1001,7 @@ function asyncContextTests(getContext: () => Promise<QuickJSAsyncContext>) {
)

try {

await vm.evalCodeAsync(`
await vm.evalCodeAsync(`
let nestingLevels = 0
function nestingFn() {
nestingLevels++
Expand All @@ -1014,11 +1013,17 @@ function asyncContextTests(getContext: () => Promise<QuickJSAsyncContext>) {
nestingFn();
`)
} catch (error) {
(error as Error).message += `\nasync calls: ${asyncFunctionCalls} (expected ${EXPECTED_NESTING_LEVEL})`
;(
error as Error
).message += `\nasync calls: ${asyncFunctionCalls} (expected ${EXPECTED_NESTING_LEVEL})`
throw error
}

assert.equal(asyncFunctionCalls, EXPECTED_NESTING_LEVEL, `${EXPECTED_NESTING_LEVEL} levels of nesting for ${buildName} build`)
assert.equal(
asyncFunctionCalls,
EXPECTED_NESTING_LEVEL,
`${EXPECTED_NESTING_LEVEL} levels of nesting for ${buildName} build`
)
})
})
}
Expand Down

0 comments on commit 3648b45

Please sign in to comment.