-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: modified sentient outpost regex to only target the
sfn
key-val…
…ue (#530)
- Loading branch information
1 parent
82736b4
commit 2b05c87
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const tmp = JSON.stringify({ | ||
prisbegin: '1687363200', | ||
prisend: '1688572800', | ||
cavabegin: '1690761600', | ||
PurchasePlatformLockEnabled: true, | ||
lqo9: { | ||
mt: ['Survival', 'Extermination', 'Alchemy'], | ||
mv: ['UnpoweredCapsules', 'FortifiedFoes', 'AlchemicalShields'], | ||
c: [ | ||
['RegeneratingEnemies', 'PointBlank'], | ||
['Quicksand', 'EMPBlackHole'], | ||
['Deflectors', 'AcceleratedEnemies'], | ||
], | ||
fv: ['ContactDamage', 'Withering', 'Gearless', 'Exhaustion'], | ||
}, | ||
sfn: 554, | ||
}); | ||
|
||
export default tmp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import * as chai from 'chai'; | ||
import sinonChai from 'sinon-chai'; | ||
|
||
import SentientOutpost from '../../lib/models/SentientOutpost.js'; | ||
import data from '../data/Tmp.js'; | ||
|
||
chai.should(); | ||
chai.use(sinonChai); | ||
|
||
describe('SentientOutpost', function () { | ||
describe('#constructor()', function () { | ||
it('should be able to handle some raw data', () => { | ||
const outpost = new SentientOutpost(data, { locale: 'en', logger: console }); | ||
|
||
outpost.id.should.equal('CrewBattleNode554:true'); | ||
outpost.mission.node.should.equal('H-2 Cloud (Veil)'); | ||
}); | ||
it('should throw TypeError when called with no argument or an invalid argument', function () { | ||
(() => { | ||
new SentientOutpost(); | ||
}).should.throw(TypeError); | ||
(() => { | ||
new SentientOutpost({}); | ||
}).should.throw(TypeError); | ||
}); | ||
}); | ||
}); |