Commit Graph

5 Commits

Author SHA1 Message Date
Guangcong Luo
229f5f809d Use assert in strict mode
This makes it so we can use `assert.equal` instead of
`assert.strictEqual`, which I think is more readable.
2020-02-20 00:39:31 -08:00
Guangcong Luo
49e65dc803 Refactor unit test battle formats again
It turns out not creating a format on-the-fly breaks deserialization.

We now just use the same custom-rule system that tournaments use.
Some hacks are currently necessary (many tests assume that we're
playing in Anything Goes rather than Custom Game) but we'll work them
out in time.
2019-12-11 16:26:45 +09:00
Guangcong Luo
801af59b98 Fix remaining build errors
- Centiskorch was misspelled in formats-data, causing a crash in the
  egg validator

- A few validation errors were due to Gen 6 not inheriting from Gen 7,
  Gen 7 not having a scripts file, and Gen 8 having a gen of 7

- Intimidate (Gen 7) wasn't inheriting from Intimidate (Gen 8), giving
  it no name, causing a few validation errors

  (Technically not a build error, but I also added Keen Eye to the list
  of Intimidate immunities, as reported by SadisticMystic.)

- A lot of tests relied on Teleport always failing; these have been
  switched to Gen 7 or swapped Teleport for Celebrate

- Inverse Mod suddenly stopped working; its implementation was a huge
  hack and I can't figure out what went wrong, so I've switched it to
	using the same system the other mod tests use. It's still a huge
	hack, but I don't have the free time to fix it right now.
2019-11-16 06:08:48 +13:00
Guangcong Luo
7a023746ba
Refactor battle.dex out of battle (#5851)
In most other similar systems, like TeamValidator, we use `thing.dex` instead of having it extend `ModdedDex`. Battle has always extended `ModdedDex`, though. This changes Battle to match the others.

This should fix an issue with `Battle.data` not being cached.

This also frees up Battle to extend ObjectReadWriteStream<string> in a future update.
2019-10-06 07:38:08 +11:00
Slayer95
ffb3678b0f Test: Update folder structure to match source code (#5436) 2019-04-14 23:57:06 +09:30