我将一些文件添加到我的解决方案中,然后在一些代码测试后删除.现在,这些项目仍在团队资源管理器的排除更改中.如何刷新Visual Studio排除的更改面板,以便删除的项目消失?
我正在尝试将一个新的 util 库添加到我的 Nx mono 存储库中。我用谷歌搜索并找到了以下命令www.nx.dev:
nx generate @nrwl/nest:library util/util-myLibName
Run Code Online (Sandbox Code Playgroud)
当我运行上述命令时,我收到以下消息:
术语“nx”不被识别为 cmdlet、函数、脚本文件或可运行程序的名称。检查名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试。
我在网上搜索了很多,但找不到解决方案。
我将测试一个方法(使用 TypeScript 语言)以确保它返回一个类的数组。
这是我的代码:
it('should return an array of Entity class', async () => {
expect(await service.getAll()).toBeInstanceOf(Entity[]);
});
Run Code Online (Sandbox Code Playgroud)
但它显示以下错误消息[]:
元素访问表达式应该带有一个参数。
我正在 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 ×2
angular ×1
c# ×1
jasmine ×1
jestjs ×1
nrwl-nx ×1
tfs ×1
typescript ×1
unit-testing ×1