-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add properties to AssetBundleConvertedEvent (#322)
* feat: add properties to AssetBundleConvertedEvent * refactor: rename AB Conversion event to AssetBundleConversionFinishedEvent
- Loading branch information
Showing
3 changed files
with
28 additions
and
20 deletions.
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
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 |
---|---|---|
@@ -1,21 +1,23 @@ | ||
import expect from 'expect' | ||
import { AssetBundleConvertedEvent, Events } from '../../../src' | ||
import { AssetBundleConversionFinishedEvent, Events } from '../../../src' | ||
|
||
describe('AssetBundleConverted Events tests', () => { | ||
it('AssetBundleConvertedEvent static tests must pass', () => { | ||
const event: AssetBundleConvertedEvent = { | ||
describe('AssetBundleConversionFinished Events tests', () => { | ||
it('AssetBundleConversionFinishedEvent static tests must pass', () => { | ||
const event: AssetBundleConversionFinishedEvent = { | ||
type: Events.Type.ASSET_BUNDLE, | ||
subType: Events.SubType.AssetBundle.CONVERTED, | ||
key: 'key', | ||
timestamp: 1, | ||
metadata: { | ||
entityId: 'baf', | ||
platform: 'mac' | ||
platform: 'mac', | ||
statusCode: 1, | ||
isLods: false | ||
} | ||
} | ||
|
||
expect(AssetBundleConvertedEvent.validate(event)).toEqual(true) | ||
expect(AssetBundleConvertedEvent.validate(null)).toEqual(false) | ||
expect(AssetBundleConvertedEvent.validate({})).toEqual(false) | ||
expect(AssetBundleConversionFinishedEvent.validate(event)).toEqual(true) | ||
expect(AssetBundleConversionFinishedEvent.validate(null)).toEqual(false) | ||
expect(AssetBundleConversionFinishedEvent.validate({})).toEqual(false) | ||
}) | ||
}) |