Skip to content

Commit

Permalink
Fix/get image extension (#59)
Browse files Browse the repository at this point in the history
* add getImageExtension

* eof
  • Loading branch information
Miorey authored Jun 25, 2024
1 parent ecf7670 commit f626303
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ if(!window.WOTLK_TO_RETAIL_DISPLAY_ID_API){
window.WOTLK_TO_RETAIL_DISPLAY_ID_API=`https://wotlk.murlocvillage.com/api/items`
}

class WebP {
getImageExtension() {
return `.webp`
}

}

if (!window.WH) {
window.WH = {}
window.WH.debug = function (...args) { console.log(args) }
window.WH.defaultAnimation = `Stand`
window.WH.WebP = new WebP()
window.WH.Wow = {
Item: {
INVENTORY_TYPE_HEAD: 1,
Expand Down
9 changes: 7 additions & 2 deletions tests/setup.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ describe(`WH`, () => {
expect(window.WOTLK_TO_RETAIL_DISPLAY_ID_API).toEqual(`https://wotlk.murlocvillage.com/api/items`)
expect(window.CONTENT_PATH).toEqual(`http://localhost:3001/modelviewer/live/`)
})
it(`check consts WH.debug`, async () => {

it(`check function WH.debug`, async () => {
WH.debug(`Hello`, `world`)
})
})

it(`check method WH.WebP.getImageExtension`, async () => {
expect(expect(WH.WebP.getImageExtension()).toEqual(`.webp`))
})
})

0 comments on commit f626303

Please sign in to comment.