-
-
Notifications
You must be signed in to change notification settings - Fork 738
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump typescript from 5.6.3 to 5.7.2 (#5109)
* Bump typescript from 5.6.3 to 5.7.2 Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.6.3 to 5.7.2. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](microsoft/TypeScript@v5.6.3...v5.7.2) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Fix unit test * Refactor with tests * Fix lint * Use the correct array types for this to succeed. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: HarelM <[email protected]>
- Loading branch information
1 parent
bd4eb37
commit cf58061
Showing
5 changed files
with
63 additions
and
47 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import {describe, expect, test, vi} from 'vitest'; | ||
import {createTileMesh, createTileMeshWithBuffers, type CreateTileMeshOptions} from './create_tile_mesh'; | ||
|
||
describe('create_tile_mesh', () => { | ||
test('createTileMeshWithBuffers should create buffer in the right size', () => { | ||
const createVertexBufferSpy = vi.fn(); | ||
const createIndexBufferSpy = vi.fn(); | ||
const contextMock: any = { | ||
createVertexBuffer: createVertexBufferSpy, | ||
createIndexBuffer: createIndexBufferSpy | ||
}; | ||
const options: CreateTileMeshOptions = {}; | ||
createTileMeshWithBuffers(contextMock, options); | ||
|
||
expect(createVertexBufferSpy.mock.calls[0][0].length).toBe(4); | ||
expect(createIndexBufferSpy.mock.calls[0][0].length).toBe(2); | ||
}); | ||
|
||
test('createTileMesh 32bit', () => { | ||
const mesh = createTileMesh({}, '32bit'); | ||
expect(mesh.indices.byteLength).toBe(6 * 2 * 2); // 32bit | ||
expect(mesh.vertices.byteLength).toBe(8 * 2); // 16bit | ||
}) | ||
|
||
test('createTileMesh 16bit', () => { | ||
const mesh = createTileMesh({}, '16bit'); | ||
expect(mesh.indices.byteLength).toBe(6 * 2); // 16bit | ||
expect(mesh.vertices.byteLength).toBe(8 * 2); // 16bit | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters