caelum0x 2b68bde5d5 Predikt: full Polymarket-style prediction market — web + mobile + on-chain + bots
Working tree is now the canonical repo. Off-chain play-money + trustless on-chain
(FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution,
mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 23:29:50 +03:00

30 lines
1004 B
JavaScript

const path = require('path');
const { promises: fs, constants: { F_OK } } = require('fs');
const { expect } = require('chai');
const { pathUpdates, updateImportPaths, getUpgradeablePath } = require('../scripts/migrate-imports.js');
describe('migrate-imports.js', function () {
it('every new path exists', async function () {
for (const p of Object.values(pathUpdates)) {
try {
await fs.access(path.join('contracts', p), F_OK);
} catch (e) {
await fs.access(path.join('contracts', getUpgradeablePath(p)), F_OK);
}
}
});
it('replaces import paths in a file', async function () {
const source = `
import '@openzeppelin/contracts/math/Math.sol';
import '@openzeppelin/contracts-upgradeable/math/MathUpgradeable.sol';
`;
const expected = `
import '@openzeppelin/contracts/utils/math/Math.sol';
import '@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol';
`;
expect(updateImportPaths(source)).to.equal(expected);
});
});