build: update to rules_typescript 0.25.1 (#28896)
* build_bazel_rules_typescript renamed to npm_bazel_typescript * build_bazel_rules_karma renamed to npm_bazel_karma * browser_repositories.bzl removed and now using @npm_bazel_karma//:browser_repositories.bzl * includes some fixes for future ts_library devmode es2015 support but some failure still remain when devmode is es2015 so this PR keeps it as es5 using the bazelOptions.devmodeTargetOverride tsconfig setting PR Close #28896
This commit is contained in:
@ -15,10 +15,6 @@ class TestObj {
|
||||
someComplexFunc(a: any) { return a; }
|
||||
}
|
||||
|
||||
class SpyTestObj extends SpyObject {
|
||||
constructor() { super(TestObj); }
|
||||
}
|
||||
|
||||
{
|
||||
describe('testing', () => {
|
||||
describe('should respect custom equality tester', () => {
|
||||
@ -87,7 +83,7 @@ class SpyTestObj extends SpyObject {
|
||||
describe('spy objects', () => {
|
||||
let spyObj: any;
|
||||
|
||||
beforeEach(() => { spyObj = new SpyTestObj(); });
|
||||
beforeEach(() => { spyObj = new SpyObject(TestObj); });
|
||||
|
||||
it('should return a new spy func with no calls',
|
||||
() => { expect(spyObj.spy('someFunc')).not.toHaveBeenCalled(); });
|
||||
@ -100,6 +96,7 @@ class SpyTestObj extends SpyObject {
|
||||
});
|
||||
|
||||
it('should match multiple function calls', () => {
|
||||
spyObj.spy('someFunc');
|
||||
spyObj.someFunc(1, 2);
|
||||
spyObj.someFunc(3, 4);
|
||||
expect(spyObj.spy('someFunc')).toHaveBeenCalledWith(1, 2);
|
||||
@ -107,11 +104,13 @@ class SpyTestObj extends SpyObject {
|
||||
});
|
||||
|
||||
it('should match null arguments', () => {
|
||||
spyObj.spy('someFunc');
|
||||
spyObj.someFunc(null, 'hello');
|
||||
expect(spyObj.spy('someFunc')).toHaveBeenCalledWith(null, 'hello');
|
||||
});
|
||||
|
||||
it('should match using deep equality', () => {
|
||||
spyObj.spy('someComplexFunc');
|
||||
spyObj.someComplexFunc([1]);
|
||||
expect(spyObj.spy('someComplexFunc')).toHaveBeenCalledWith([1]);
|
||||
});
|
||||
@ -122,8 +121,10 @@ class SpyTestObj extends SpyObject {
|
||||
expect(s.b()).toEqual(2);
|
||||
});
|
||||
|
||||
it('should create spys for all methods',
|
||||
() => { expect(() => spyObj.someFunc()).not.toThrow(); });
|
||||
it('should create spys for all methods', () => {
|
||||
spyObj.spy('someFunc');
|
||||
expect(() => spyObj.someFunc()).not.toThrow();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user