Lines Matching refs:t

17 export function test(t) {  argument
18 t.describe('Audio class', () => {
19 t.describe('Audio.setAudioModeAsync', () => {
60 t.it('rejects an invalid promise', async () => {
76 t.expect(error).not.toBeNull();
77 error && t.expect(error.message).toMatch('Impossible audio mode');
83 t.describe('Audio instances', () => {
86 t.beforeAll(async () => {
90 t.beforeEach(() => {
94 t.afterEach(async () => {
99 t.describe('Audio.loadAsync', () => {
100 t.it('loads the file with `require`', async () => {
105 t.it('loads the file from `Asset`', async () => {
110 t.it('loads the file from the Internet', async () => {
115 t.describe('cookie session', () => {
116 t.afterEach(async () => {
127 t.it(
138 t.expect(error).toBeDefined();
140 t.expect(error.message).toMatch('Response code: 401');
142 t.expect(error.message).toMatch('error code -1013');
150 t.expect(signInResponse).toMatch('Signed in successfully!');
159 t.expect(error).toBeNull();
165 t.it(
190 t.expect(error).toBeNull();
196 t.it(
223 t.expect(error).toBeNull();
228 t.it('redirects from HTTPS URL to HTTPS URL (302)', async () => {
238 t.expect(error).toBeNull();
242 t.it(
254 t.expect(hasBeenRejected).toBe(true);
257 t.it(
270 t.expect(hasBeenRejected).toBe(false);
274 t.it(
286 t.expect(hasBeenRejected).toBe(false);
291 t.it('loads HLS stream', async () => {
298 t.it('loads the file from the Internet (with redirecting URL)', async () => {
305 t.it('rejects if a file is already loaded', async () => {
313 error && t.expect(error.message).toMatch('already loaded');
315 t.expect(hasBeenRejected).toBe(true);
319 t.describe('Audio.loadAsync(require, initialStatus)', () => {
320 t.it('sets an initial status', async () => {
334 t.describe('Audio.setStatusAsync', () => {
335 t.it('sets a status', async () => {
349 t.describe('Audio.unloadAsync(require, initialStatus)', () => {
350 t.it('unloads the object when it is loaded', async () => {
357 t.it("rejects if the object isn't loaded", async () => {
364 t.expect(hasBeenRejected).toBe(false);
415 t.describe('Audio.playAsync', () => {
416 t.it('plays the sound', async () => {
423 t.describe('Audio.replayAsync', () => {
424 t.it('replays the sound', async () => {
434 t.expect(statusAfter.positionMillis).toBeLessThan(statusBefore.positionMillis);
451 t.describe('Audio.pauseAsync', () => {
452 t.it('pauses the sound', async () => {
463 t.describe('Audio.stopAsync', () => {
464 t.it('stops the sound', async () => {
472 t.describe('Audio.setPositionAsync', () => {
473 t.it('sets the position', async () => {
481 t.describe('Audio.setPositionAsync', () => {
482 t.it('sets the position', async () => {
489 t.it('sets the position with tolerance', async () => {
500 t.describe('Audio.setVolumeAsync', () => {
501 t.beforeEach(async () => {
506 t.it('sets the volume', async () => {
511 t.it('sets the audio panning', async () => {
517 t.it(
525 error && t.expect(error.message).toMatch(/value .+ between/);
527 t.expect(hasBeenRejected).toBe(true);
538 t.describe('Audio.setIsMutedAsync', () => {
539 t.it('sets whether the audio is muted', async () => {
547 t.describe('Audio.setIsLoopingAsync', () => {
548 t.it('sets whether the audio is looped', async () => {
572 t.describe('Audio.setRateAsync', () => {
578 t.beforeEach(async () => {
582 t.expect(status.rate).toBeCloseTo(rate, 2);
585 t.afterEach(async () => {
594 t.expect(status.rate).toBeCloseTo(rate, 2);
595 t.expect(status.shouldCorrectPitch).toBe(shouldCorrectPitch);
596 t.expect(status.pitchCorrectionQuality).toBe(pitchCorrectionQuality);
601 t.expect(hasBeenRejected).toEqual(shouldError);
608 t.it('sets rate with shouldCorrectPitch = true', async () => {
613 t.it('sets rate with shouldCorrectPitch = false', async () => {
618 t.it('sets pitchCorrectionQuality to Low', async () => {
624 t.it('sets pitchCorrectionQuality to Medium', async () => {
628 t.it('sets pitchCorrectionQuality to High', async () => {
632 t.it('rejects too high rate', async () => {
637 t.it('rejects negative rate', async () => {