Javascript 运行';时在specter.scss上获取错误;纱线测试/npm运行测试';

Javascript 运行';时在specter.scss上获取错误;纱线测试/npm运行测试';,javascript,node.js,reactjs,spectre,Javascript,Node.js,Reactjs,Spectre,问题在于运行npm测试/纱线测试时 请看下面的错误,我收到一个语法错误:spectre.scss中的无效或意外令牌。我没有碰它,也没有放任何代码 Austine-Temp:mule-starter wslemployee$ yarn test yarn run v1.22.10 $ jest --reporters=jest-standard-reporter FAIL src/App.test.js ● Test suite failed to run /src/styles

问题在于运行npm测试/纱线测试时

请看下面的错误,我收到一个语法错误:spectre.scss中的无效或意外令牌。我没有碰它,也没有放任何代码

Austine-Temp:mule-starter wslemployee$ yarn test
yarn run v1.22.10
$ jest --reporters=jest-standard-reporter
 FAIL  src/App.test.js
  ● Test suite failed to run

    /src/styles/spectre.scss:2
    @import "variables";
    ^

    SyntaxError: Invalid or unexpected token

    > 1 | import './styles/spectre.scss'
        | ^
      2 | import './styles/spectre-exp.scss'
      3 | import './styles/spectre-icons.scss'
      4 | import './styles/custom.scss'

      at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
      at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:579:25)
      at Object.<anonymous> (src/App.js:1:1)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        3.188s
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 
Austine温度:骡子起动器wslemployee$纱线测试
纱线运行v1.22.10
$jest——记者=标准记者
失败src/App.test.js
● 测试套件无法运行
/src/styles/spectre.scss:2
@导入“变量”;
^
SyntaxError:无效或意外的令牌
>1 |导入“./style/spectre.scss”
| ^
2 |导入“/styles/spectre-exp.scss”
3 |导入“./style/spectre icons.scss”
4 |导入“./style/custom.scss”
在ScriptTransformer._transformAndBuildScript(节点_modules/@jest/transform/build/ScriptTransformer.js:537:17)
在ScriptTransformer.transform(node_modules/@jest/transform/build/ScriptTransformer.js:579:25)
反对。(src/App.js:1:1)
测试套件:1个失败,共1个
测试:共0项
快照:共0个
时间:3.188s
错误命令失败,退出代码为1。
信息访问https://yarnpkg.com/en/docs/cli/run 有关此命令的文档。
这是我的App.test.js。目前几乎没有代码

import React from "react";
import App from "./App";
import { shallow, mount } from "enzyme";
import toJson from "enzyme-to-json";

describe("rendering components", () => {
  it("renders App component without crashing", () =>{
    shallow(<App />);
  });
}); 
从“React”导入React;
从“/App”导入应用程序;
从“酶”中导入{shall,mount};
从“酶到json”导入toJson;
描述(“呈现组件”,()=>{
它(“在不崩溃的情况下呈现应用程序组件”,()=>{
浅();
});
});