We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d463dc9 commit 497b5c7Copy full SHA for 497b5c7
test/Test-GCSDataStore.js
@@ -95,6 +95,25 @@ describe('GCSDataStore', () => {
95
});
96
97
describe('create', () => {
98
+ it('should reject when namingFunction is invalid', () => {
99
+ const req = {
100
+ headers: {
101
+ 'upload-length': TEST_FILE_SIZE,
102
+ },
103
+ };
104
+ const namingFunction = (incomingReq) => incomingReq.body.filename.replace(/\//g, '-');
105
+ const file_store = new GCSDataStore({
106
+ path: STORE_PATH,
107
+ projectId: PROJECT_ID,
108
+ keyFilename: KEYFILE,
109
+ bucket: BUCKET,
110
+ namingFunction
111
+ });
112
+ return file_store.create(req)
113
+ .should.be.rejected();
114
115
+
116
117
it('should reject requests without a length header', () => {
118
const req = {
119
headers: {},
0 commit comments