小编Moh*_*sen的帖子

如何从排除的更改中删除项目

我将一些文件添加到我的解决方案中,然后在一些代码测试后删除.现在,这些项目仍在团队资源管理器的排除更改中.如何刷新Visual Studio排除的更改面板,以便删除的项目消失?

c# tfs visual-studio team-explorer

5
推荐指数
1
解决办法
5012
查看次数

“nx”未被识别为 cmdlet 的名称

我正在尝试将一个新的 util 库添加到我的 Nx mono 存储库中。我用谷歌搜索并找到了以下命令www.nx.dev

nx generate @nrwl/nest:library util/util-myLibName
Run Code Online (Sandbox Code Playgroud)

当我运行上述命令时,我收到以下消息:

术语“nx”不被识别为 cmdlet、函数、脚本文件或可运行程序的名称。检查名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试。

我在网上搜索了很多,但找不到解决方案。

nrwl-nx

3
推荐指数
4
解决办法
1552
查看次数

如何在 Jest 中测试方法是否返回类的数组

我将测试一个方法(使用 TypeScript 语言)以确保它返回一个类的数组。

这是我的代码:

it('should return an array of Entity class', async () => {
    expect(await service.getAll()).toBeInstanceOf(Entity[]);
});
Run Code Online (Sandbox Code Playgroud)

但它显示以下错误消息[]

元素访问表达式应该带有一个参数。

javascript typescript jestjs

3
推荐指数
1
解决办法
3555
查看次数

错误 TS2304:找不到名称“createNewEvent”

我正在 Angular 11 中为我的输入框编写单元测试。

这是我的 spec.ts 代码:

import { ComponentFixture, TestBed } from '@angular/core/testing';
import 'jasmine';
import { ExpectedConditions } from 'protractor';
import { MicroplateComponent } from './microplate.component';

describe('MicroplateComponent', () => {
  let component: MicroplateComponent;
  let fixture: ComponentFixture<MicroplateComponent>;

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      declarations: [MicroplateComponent]
    })
      .compileComponents();
  });

  beforeEach(() => {
    fixture = TestBed.createComponent(MicroplateComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  describe('Evaluation of input box', () => {
    it('Should return true for "1, 2, 3"', () => {
      const input = …
Run Code Online (Sandbox Code Playgroud)

javascript integration-testing unit-testing jasmine angular

2
推荐指数
1
解决办法
373
查看次数