2021-05-27 06:03:38 +02:00
|
|
|
import getArch from '../src/get-arch';
|
|
|
|
|
|
|
|
|
|
describe('getArch', () => {
|
|
|
|
|
test('processor architecture', () => {
|
2024-02-03 03:04:41 +01:00
|
|
|
expect(getArch('x64')).toBe('amd64');
|
|
|
|
|
expect(getArch('arm')).toBe('arm');
|
|
|
|
|
expect(getArch('arm64')).toBe('arm64');
|
2021-05-27 06:03:38 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test('exception', () => {
|
|
|
|
|
expect(() => {
|
|
|
|
|
getArch('mips');
|
|
|
|
|
}).toThrowError('mips is not supported');
|
|
|
|
|
});
|
|
|
|
|
});
|