Skip to content

Commit

Permalink
fix rest of karma tests
Browse files Browse the repository at this point in the history
  • Loading branch information
riknoll committed Jan 31, 2024
1 parent 28f48a1 commit 515991e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const puppeteer = require('puppeteer');
// process.env.CHROME_BIN = puppeteer.executablePath()
process.env.CHROME_BIN = puppeteer.executablePath()
console.log(`chromium: `, process.env.CHROME_BIN)

// Karma configuration
Expand Down Expand Up @@ -72,7 +72,7 @@ module.exports = function(config) {

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
singleRun: true,

// Concurrency level
// how many browser should be started simultaneous
Expand Down
2 changes: 1 addition & 1 deletion newblocks/compiler/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ function compileArgument(e: Environment, b: Blockly.Block, p: pxt.blocks.BlockPa
return prefixWithSemicolon(compileExpression(e, target, comments));
}

if (p.shadowOptions && p.shadowOptions.toString && isStringType(returnType(e, target))) {
if (p.shadowOptions && p.shadowOptions.toString && !isStringType(returnType(e, target))) {
return pxt.blocks.H.mkSimpleCall("+", [pxt.blocks.H.mkStringLiteral(""), pxt.blocks.H.mkParenthesizedExpression(compileExpression(e, target, comments))]);
}

Expand Down
3 changes: 2 additions & 1 deletion tests/blocklycompiler-test/fieldUserEnum.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference path="..\..\built\pxtlib.d.ts" />
/// <reference path="..\..\built\pxtblocks.d.ts" />

import * as pxtblockly from "../../newblocks";

describe("field user enum (when picking new enum values)", () => {
it("should start at 0 if no flag is set", () => {
Expand Down
3 changes: 3 additions & 0 deletions tests/blocklycompiler-test/test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import * as Blockly from "blockly";
import * as pxtblockly from "../../newblocks";
import { DuplicateOnDragConnectionChecker } from "../../newblocks/plugins/duplicateOnDrag";

import "./commentparsing.spec";
import "./fieldUserEnum.spec";

const WEB_PREFIX = "http://localhost:9876";

// Blockly crashes if this isn't defined
Expand Down

0 comments on commit 515991e

Please sign in to comment.