Merge branch 'main' into avm99963-monorail
Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266
GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/static_src/shared/helpers.test.js b/static_src/shared/helpers.test.js
index 7c40ed5..e05a9a2 100644
--- a/static_src/shared/helpers.test.js
+++ b/static_src/shared/helpers.test.js
@@ -1,12 +1,11 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {assert} from 'chai';
import {arrayDifference, setHasAny, capitalizeFirst, hasPrefix, objectToMap,
objectValuesForKeys, equalsIgnoreCase, immutableSplice, userIsMember,
- urlWithNewParams, createObjectComparisonFunc} from './helpers.js';
-
+ urlWithNewParams, createObjectComparisonFunc, generateProjectIssueURL} from './helpers.js';
describe('arrayDifference', () => {
it('empty array stays empty', () => {
@@ -359,3 +358,15 @@
});
});
});
+
+describe('generateProjectIssueURL', () => {
+ it('no redirect required and no param', () => {
+ assert.equal(generateProjectIssueURL('project', '/list'), '/p/project/issues/list');
+ });
+
+ it('no redirect required and with param', () => {
+ assert.equal(generateProjectIssueURL('project', '/detail', {'id': 123}), '/p/project/issues/detail?id=123');
+ });
+
+ //TODO(crbug.com/monorail/12029): add more unit test.
+});
\ No newline at end of file