Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: CI
on: pull_request

permissions:
contents: read

jobs:
test:
timeout-minutes: 5
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ on:
push:
branches:
- main

permissions:
contents: read

jobs:
release:
name: Release
Expand Down
12 changes: 6 additions & 6 deletions test/d2l-localize-behavior.test.js

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
Expand Up @@ -234,30 +234,30 @@ describe('d2l-localize-behavior', () => {

it('should format a time using default format', () => {
const val = elem.formatTime(date);
expect(val).to.equal('5:13 PM');
expect(val).to.equal('5:13 PM');
});

it('should format a time using specified format', () => {
const val = elem.formatTime(date, { format: 'full' });
expect(val).to.equal('5:13 PM ');
expect(val).to.equal('5:13 PM ');
});

it('should format time via data binding', () => {
expect(elem.$$('.time').innerText).to.equal('5:13 PM');
expect(elem.$$('.time').innerText).to.equal('5:13 PM');
});

it('should format a date/time using default format', () => {
const val = elem.formatDateTime(date);
expect(val).to.equal('12/1/2017 5:13 PM');
expect(val).to.equal('12/1/2017 5:13 PM');
});

it('should format a date/time using specified format', () => {
const val = elem.formatDateTime(date, { format: 'medium' });
expect(val).to.equal('Dec 1, 2017 5:13 PM');
expect(val).to.equal('Dec 1, 2017 5:13 PM');
});

it('should format a date/time using data binding', () => {
expect(elem.$$('.date-time').innerText).to.equal('12/1/2017 5:13 PM');
expect(elem.$$('.date-time').innerText).to.equal('12/1/2017 5:13 PM');
});

it('should parse a date', () => {
Expand Down
Loading