Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tfjs-backend-wasm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@

import './kernels/all_kernels';
export {BackendWasm, setWasmPath} from './backend_wasm';
export {version as version_wasm} from './version';
29 changes: 29 additions & 0 deletions tfjs-backend-wasm/src/version_test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* @license
* Copyright 2018 Google LLC.
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
* =============================================================================
*/

// tslint:disable-next-line:no-require-imports
const packageJSON = require('../package.json');
import {version_wasm} from './index';

describe('tfjs-core version consistency', () => {
it('dev-peer match', () => {
const tfjsCoreDevDepVersion =
packageJSON.devDependencies['@tensorflow/tfjs-core'];
const tfjsCorePeerDepVersion =
packageJSON.peerDependencies['@tensorflow/tfjs-core'];
expect(tfjsCoreDevDepVersion).toEqual(tfjsCorePeerDepVersion);
});

it('version.ts matches package version', () => {
// tslint:disable-next-line:no-require-imports
const expected = require('../package.json').version;
expect(version_wasm).toBe(expected);
});
});