Move to 4 flavor build and tests

This commit is contained in:
Nick Gerleman
2022-12-23 00:43:57 -08:00
parent 4f233df064
commit 3352385fb0
15 changed files with 174 additions and 181 deletions

View File

@@ -1,3 +1,4 @@
#!/usr/bin/env node
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
@@ -21,12 +22,12 @@ let testFiles = process.argv.slice(2).map(file => {
let testResults = new Map();
for (let type of ['asm', 'wasm']) {
for (let type of ['asmjs', 'wasm']) {
for (let file of testFiles) {
vm.runInNewContext(
file,
Object.assign(Object.create(global), {
Yoga: require(type === 'asm' ? '../dist/index.asm' : '../dist/index.wasm'),
Yoga: require(type === 'asmjs' ? '../dist/sync.asmjs' : '../dist/sync.wasm'),
YGBENCHMARK: function(name, fn) {
let testEntry = testResults.get(name);