mirror of
https://github.com/msojocs/wx-compiler.git
synced 2025-07-19 00:00:04 +08:00
test: 添加wcsc raw测试用例
This commit is contained in:
parent
4554542ae5
commit
cec876c760
3
.gitignore
vendored
3
.gitignore
vendored
@ -6,4 +6,5 @@ node_modules
|
|||||||
*output.json
|
*output.json
|
||||||
*err.js
|
*err.js
|
||||||
*stderr.json
|
*stderr.json
|
||||||
.cache
|
.cache
|
||||||
|
*/spec/**/*.js
|
@ -1,8 +1,8 @@
|
|||||||
const assert = require("assert");
|
import assert from "assert";
|
||||||
const node = require("../../runner/node");
|
import path from "path";
|
||||||
const wine = require("../../runner/wine");
|
import node from '../../../runner/node'
|
||||||
const path = require("path");
|
import wine from '../../../runner/wine'
|
||||||
const fs = require("fs");
|
import * as fs from 'fs'
|
||||||
|
|
||||||
describe("wcsc", function () {
|
describe("wcsc", function () {
|
||||||
describe("Raw: node output should equal with wine", function () {
|
describe("Raw: node output should equal with wine", function () {
|
||||||
@ -14,7 +14,7 @@ describe("wcsc", function () {
|
|||||||
it("主界面", async function () {
|
it("主界面", async function () {
|
||||||
const projectPath = path.resolve(
|
const projectPath = path.resolve(
|
||||||
__dirname,
|
__dirname,
|
||||||
"../../examples/miniprogram-demo/miniprogram"
|
"/mnt/d/Work/WeChatProjects/miniprogram-demo/miniprogram"
|
||||||
);
|
);
|
||||||
const args = [
|
const args = [
|
||||||
"-db",
|
"-db",
|
||||||
@ -43,7 +43,7 @@ describe("wcsc", function () {
|
|||||||
const n = await node.wcsc(args, projectPath);
|
const n = await node.wcsc(args, projectPath);
|
||||||
const storagePath = path.resolve(
|
const storagePath = path.resolve(
|
||||||
__dirname,
|
__dirname,
|
||||||
`miniprogram-demo/${this.test.title}`
|
`miniprogram-demo/${this.test?.title}`
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
fs.mkdirSync(storagePath, { recursive: true });
|
fs.mkdirSync(storagePath, { recursive: true });
|
||||||
@ -61,7 +61,7 @@ describe("wcsc", function () {
|
|||||||
it("接口-设置界面标题", async function () {
|
it("接口-设置界面标题", async function () {
|
||||||
const projectPath = path.resolve(
|
const projectPath = path.resolve(
|
||||||
__dirname,
|
__dirname,
|
||||||
"../../examples/miniprogram-demo/miniprogram/"
|
"/mnt/d/Work/WeChatProjects/miniprogram-demo/miniprogram/"
|
||||||
);
|
);
|
||||||
const args = [
|
const args = [
|
||||||
"-db",
|
"-db",
|
||||||
@ -166,7 +166,7 @@ describe("wcsc", function () {
|
|||||||
const n = await node.wcsc(args, projectPath);
|
const n = await node.wcsc(args, projectPath);
|
||||||
const storagePath = path.resolve(
|
const storagePath = path.resolve(
|
||||||
__dirname,
|
__dirname,
|
||||||
`miniprogram-demo/${this.test.title}`
|
`miniprogram-demo/${this.test?.title}`
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
fs.mkdirSync(storagePath, { recursive: true });
|
fs.mkdirSync(storagePath, { recursive: true });
|
Loading…
x
Reference in New Issue
Block a user