From 298cb72b74024b74c08935499175540740a2d5de Mon Sep 17 00:00:00 2001 From: Zeno Zeng Date: Wed, 9 Mar 2022 22:58:22 +0800 Subject: [PATCH] test: update text test --- package.json | 1 + test/tests/text.js | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 429034c..1d70c2c 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "svgcanvas", "main": "dist/svgcanvas.js", "scripts": { + "watch": "rollup -c -w", "build": "rollup -c", "prepublishOnly": "npm run build", "test": "karma start" diff --git a/test/tests/text.js b/test/tests/text.js index 26bceba..273d8c8 100644 --- a/test/tests/text.js +++ b/test/tests/text.js @@ -1,8 +1,5 @@ export default function text(ctx) { - ctx.font = "normal 36px Times"; + ctx.font = "normal 120px Arial"; ctx.fillStyle = "#000000"; - ctx.fillText("A Text Example", 50, 50); - ctx.font = "normal 36px Arial"; - ctx.strokeStyle = "#000000"; - ctx.strokeText("A Text Example", 50, 90); + ctx.fillText("Hello", 0, 200); };