"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/angular_devkit/core/src/workspace/host_spec.ts" between
angular-cli-12.0.3.tar.gz and angular-cli-12.0.4.tar.gz

About: Angular CLI is a command line interface for Angular.

host_spec.ts  (angular-cli-12.0.3):host_spec.ts  (angular-cli-12.0.4)
skipping to change at line 24 skipping to change at line 24
let workspaceHost: WorkspaceHost; let workspaceHost: WorkspaceHost;
beforeEach(() => { beforeEach(() => {
testHost = new test.TestHost({ testHost = new test.TestHost({
'abc.txt': 'abcdefg', 'abc.txt': 'abcdefg',
'foo/bar.json': '{}', 'foo/bar.json': '{}',
}); });
workspaceHost = createWorkspaceHost(testHost); workspaceHost = createWorkspaceHost(testHost);
}); });
it('supports isFile', async (done) => { it('supports isFile', async () => {
expect(await workspaceHost.isFile('abc.txt')).toBeTruthy(); expect(await workspaceHost.isFile('abc.txt')).toBeTruthy();
expect(await workspaceHost.isFile('foo/bar.json')).toBeTruthy(); expect(await workspaceHost.isFile('foo/bar.json')).toBeTruthy();
expect(await workspaceHost.isFile('foo\\bar.json')).toBeTruthy(); expect(await workspaceHost.isFile('foo\\bar.json')).toBeTruthy();
expect(await workspaceHost.isFile('foo')).toBeFalsy(); expect(await workspaceHost.isFile('foo')).toBeFalsy();
expect(await workspaceHost.isFile('not.there')).toBeFalsy(); expect(await workspaceHost.isFile('not.there')).toBeFalsy();
done();
}); });
it('supports isDirectory', async (done) => { it('supports isDirectory', async () => {
expect(await workspaceHost.isDirectory('foo')).toBeTruthy(); expect(await workspaceHost.isDirectory('foo')).toBeTruthy();
expect(await workspaceHost.isDirectory('foo/')).toBeTruthy(); expect(await workspaceHost.isDirectory('foo/')).toBeTruthy();
expect(await workspaceHost.isDirectory('foo\\')).toBeTruthy(); expect(await workspaceHost.isDirectory('foo\\')).toBeTruthy();
expect(await workspaceHost.isDirectory('abc.txt')).toBeFalsy(); expect(await workspaceHost.isDirectory('abc.txt')).toBeFalsy();
expect(await workspaceHost.isDirectory('foo/bar.json')).toBeFalsy(); expect(await workspaceHost.isDirectory('foo/bar.json')).toBeFalsy();
expect(await workspaceHost.isDirectory('not.there')).toBeFalsy(); expect(await workspaceHost.isDirectory('not.there')).toBeFalsy();
done();
}); });
it('supports readFile', async (done) => { it('supports readFile', async () => {
expect(await workspaceHost.readFile('abc.txt')).toBe('abcdefg'); expect(await workspaceHost.readFile('abc.txt')).toBe('abcdefg');
done();
}); });
it('supports writeFile', async (done) => { it('supports writeFile', async () => {
await workspaceHost.writeFile('newfile', 'baz'); await workspaceHost.writeFile('newfile', 'baz');
expect(testHost.files.sort() as string[]).toEqual(['/abc.txt', '/foo/bar.jso n', '/newfile']); expect(testHost.files.sort() as string[]).toEqual(['/abc.txt', '/foo/bar.jso n', '/newfile']);
expect(testHost.$read('newfile')).toBe('baz'); expect(testHost.$read('newfile')).toBe('baz');
done();
}); });
}); });
 End of changes. 8 change blocks. 
12 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)