/** ponytail: assert TV resolutions map 1:1 to Dena periods (no 180→240 / 480→720). */ const assert = require("assert"); const { tradingViewResolutionToDena } = require("../src/lib/mapOhlcv"); const cases = [ ["60", 60], ["120", 120], ["240", 240], ["360", 360], ["720", 720], ["1D", 1440], ["D", 1440], ["d", 1440], ]; for (const [res, period] of cases) { assert.strictEqual( tradingViewResolutionToDena(res), period, `${res} → ${period}` ); } // Fake intervals must NOT silently alias to a different bucket. assert.strictEqual(tradingViewResolutionToDena("180"), 180); assert.strictEqual(tradingViewResolutionToDena("480"), 480); console.log("ok: mapOhlcv TV resolutions");