Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Commit e826a52

Browse files
fix: self-upload files for Unicode system tests (#1318)
* fix: self-upload files for Unicode system tests * refactored file variable in response to PR comments Co-authored-by: Stephen <stephenplusplus@users.noreply.github.com> Co-authored-by: Stephen <stephenplusplus@users.noreply.github.com>
1 parent ea35986 commit e826a52

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

system-test/storage.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -880,18 +880,19 @@ describe('storage', () => {
880880

881881
let bucket: Bucket;
882882

883-
before(() => {
884-
bucket = storage.bucket('storage-library-test-bucket');
883+
before(async () => {
884+
[bucket] = await storage.createBucket(generateName());
885885
});
886886

887887
// Normalization form C: a single character for e-acute;
888888
// URL should end with Cafe%CC%81
889-
it('should not perform normalization form C', () => {
889+
it('should not perform normalization form C', async () => {
890890
const name = 'Caf\u00e9';
891-
const file = bucket.file(name);
892-
893891
const expectedContents = 'Normalization Form C';
894892

893+
const file = bucket.file(name);
894+
await file.save(expectedContents);
895+
895896
return file
896897
.get()
897898
.then(data => {
@@ -906,12 +907,13 @@ describe('storage', () => {
906907

907908
// Normalization form D: an ASCII character followed by U+0301 combining
908909
// character; URL should end with Caf%C3%A9
909-
it('should not perform normalization form D', () => {
910+
it('should not perform normalization form D', async () => {
910911
const name = 'Cafe\u0301';
911-
const file = bucket.file(name);
912-
913912
const expectedContents = 'Normalization Form D';
914913

914+
const file = bucket.file(name);
915+
await file.save(expectedContents);
916+
915917
return file
916918
.get()
917919
.then(data => {

0 commit comments

Comments
 (0)