Skip to content

Commit eed8f33

Browse files
committed
fix: adding a new test for the date formatter
TRACEFOSS-865_Date_interpreted_instead_of_NULL
1 parent 44702ca commit eed8f33

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/********************************************************************************
2+
* Copyright (c) 2022, 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
3+
* Copyright (c) 2022, 2023 ZF Friedrichshafen AG
4+
* Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
5+
*
6+
* See the NOTICE file(s) distributed with this work for additional
7+
* information regarding copyright ownership.
8+
*
9+
* This program and the accompanying materials are made available under the
10+
* terms of the Apache License, Version 2.0 which is available at
11+
* https://www.apache.org/licenses/LICENSE-2.0.
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16+
* License for the specific language governing permissions and limitations
17+
* under the License.
18+
*
19+
* SPDX-License-Identifier: Apache-2.0
20+
********************************************************************************/
21+
22+
import { screen } from '@testing-library/angular';
23+
import { renderComponent } from '@tests/test-render.utils';
24+
import { SharedModule } from '..';
25+
26+
describe('FormatDatePipe', () => {
27+
it('should format date having the 1970 value for the year', async () => {
28+
await renderComponent(`{{ 'unitTest.test01' | formatDate }}`, {
29+
imports: [SharedModule],
30+
});
31+
32+
expect(screen.getByText('This is for unit tests purposes.')).toBeInTheDocument();
33+
});
34+
});

0 commit comments

Comments
 (0)