Jump to content

How to clear the game cache without making it null


spinnerbox
 Share

Recommended Posts

I want to make several unit tests that test my loading functionality. That means i have to run Phaser.Cache.destroy() just so I make sure the assets were not loaded by the previous test. The problem is destroy() makes the cache null which is not what I want. I just want to clear the data it holds.

I even tried this:

game.cache = new Phaser.Cache(game);

But it doesn't seem to be working.

What should I do in this case?

Link to comment
Share on other sites

  • 6 years later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...