mirror of
https://github.com/axios/axios.git
synced 2026-04-11 02:11:50 +08:00
* feat: implement prettier and fix all issues * fix: failing tests * fix: implement feedback from codel, ai etc * chore: dont throw in trim function Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * fix: incorrect fix --------- Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
28 lines
771 B
JavaScript
28 lines
771 B
JavaScript
import fs from 'fs';
|
|
import assert from 'assert';
|
|
import axios from '../index.js';
|
|
import axiosBuild from '../dist/node/axios.cjs';
|
|
|
|
const { version } = JSON.parse(fs.readFileSync('./package.json'));
|
|
|
|
console.log('Checking versions...\n----------------------------');
|
|
|
|
console.log(`Package version: v${version}`);
|
|
console.log(`Axios version: v${axios.VERSION}`);
|
|
console.log(`Axios build version: v${axiosBuild.VERSION}`);
|
|
console.log(`----------------------------`);
|
|
|
|
assert.strictEqual(
|
|
version,
|
|
axios.VERSION,
|
|
`Version mismatch between package and Axios ${version} != ${axios.VERSION}`
|
|
);
|
|
|
|
assert.strictEqual(
|
|
version,
|
|
axiosBuild.VERSION,
|
|
`Version mismatch between package and build ${version} != ${axiosBuild.VERSION}`
|
|
);
|
|
|
|
console.log('✔️ PASSED\n');
|