Fix Node.js test runner with CommonJS exports
This commit is contained in:
@@ -620,3 +620,8 @@ function getModifierString(modifiers) {
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
// Export for Node.js (CommonJS)
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = { decodeDragonCode };
|
||||
}
|
||||
|
||||
@@ -736,3 +736,8 @@ function parseTechnology(token) {
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Export for Node.js (CommonJS)
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = { parseDragonCode };
|
||||
}
|
||||
|
||||
@@ -247,3 +247,8 @@ function resolveSpeciesCode(code) {
|
||||
// Return the accumulated path or the name if we have it
|
||||
return path.length > 0 ? path[path.length - 1] : null;
|
||||
}
|
||||
|
||||
// Export for Node.js (CommonJS)
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = { SPECIES_DATA, resolveSpeciesCode };
|
||||
}
|
||||
|
||||
@@ -406,3 +406,8 @@ const TAG_DESCRIPTIONS = {
|
||||
'---!': "Cold fury - they're going to hunt you, and find you, and..."
|
||||
}
|
||||
};
|
||||
|
||||
// Export for Node.js (CommonJS)
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = { TAG_DESCRIPTIONS };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user