Skip to content

Commit d048fd1

Browse files
authored
Merge pull request #8 from joplin/githubAction
GitHub action and a few changes
2 parents 8f07966 + 52c5005 commit d048fd1

File tree

3 files changed

+42
-3
lines changed

3 files changed

+42
-3
lines changed

.github/workflows/Email-Plugin-CI.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Email Plugin Continuous Integration
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version: [14.x]
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
25+
- run: npm install
26+
- run: npm test

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/noteLocationBySubject.test.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('Naive Case.', ()=>{
2323
const loc = noteLocationBySubject('@JOPLIN #JOPLIN');
2424
const ans = {
2525
folders: ['JOPLIN'],
26-
tags: ['JOPLIN'],
26+
tags: ['joplin'],
2727
};
2828
expect(loc).toEqual(ans);
2929
});
@@ -176,3 +176,16 @@ describe('Irregular spaces.', ()=>{
176176
expect(loc).toEqual(ans);
177177
});
178178
});
179+
180+
describe('Subject with duplicate tags.', ()=>{
181+
it('should ignore duplicates tags.', ()=>{
182+
const loc = noteLocationBySubject('email subject @joplin #joplin #gmail #joplin #tag #TAG');
183+
184+
const ans = {
185+
folders: ['joplin'],
186+
tags: ['joplin', 'gmail', 'tag'],
187+
};
188+
189+
expect(loc).toEqual(ans);
190+
});
191+
});

0 commit comments

Comments
 (0)