mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-17 14:21:25 +02:00
A browser-based roguelike synchronized with crypto block timing. A run is a race against the next block: reach the exit before the block lands, or the house wins. The same codebase runs the solo dungeon, the social Tavern, and operator-selected PvP and race rulesets, with separate free and paid leaderboards. Self-hostable under the MIT License. See README.md to run it, docs/ARCHITECTURE.md for the design, and docs/DEPLOY.md to operate an instance.
36 lines
1.3 KiB
JavaScript
36 lines
1.3 KiB
JavaScript
const {
|
|
selectPublicPaidModeDescriptors
|
|
} = require('../src/config/operatedProductProfiles');
|
|
|
|
const descriptors = Object.freeze({
|
|
PAID_SINGLE: Object.freeze({ enabled: true, name: 'Paid Single Game' }),
|
|
PAID_CREDITS: Object.freeze({ enabled: true, name: 'Credits Package' })
|
|
});
|
|
|
|
describe('operated-product public paid-mode contract', () => {
|
|
test('play.wowne.ro publishes credits and omits direct entry', () => {
|
|
const result = selectPublicPaidModeDescriptors({
|
|
OPERATED_PRODUCT_PROFILE: 'such-play-wow-prestige'
|
|
}, descriptors);
|
|
|
|
expect(result).toEqual({ PAID_CREDITS: descriptors.PAID_CREDITS });
|
|
expect(result).not.toHaveProperty('PAID_SINGLE');
|
|
});
|
|
|
|
test('monerogue.app publishes direct entry and omits purchased credits', () => {
|
|
const result = selectPublicPaidModeDescriptors({
|
|
OPERATED_PRODUCT_PROFILE: 'such-monerogue-stagenet'
|
|
}, descriptors);
|
|
|
|
expect(result).toEqual({ PAID_SINGLE: descriptors.PAID_SINGLE });
|
|
expect(result).not.toHaveProperty('PAID_CREDITS');
|
|
});
|
|
|
|
test('generic MIT deployments retain both legacy API descriptors', () => {
|
|
const result = selectPublicPaidModeDescriptors({}, descriptors);
|
|
|
|
expect(result).toEqual(descriptors);
|
|
expect(result).not.toBe(descriptors);
|
|
});
|
|
});
|