Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Frontend
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
383
Merge Requests
62
CI / CD
Security & Compliance
Packages
Analytics
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
779ade54
Commit
779ade54
authored
1 hour ago
by
Ben Hayward
Browse files
Options
Download
Update tags.spec.ts
parent
2ae89295
fix/hashtag-pipes-2361
1 merge request
!762
Updated URL regex for hashtags to disregard hashes used mid-sentence. #2361
Pipeline
#115312728
failed with stages
in 6 minutes and 13 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
src/app/common/pipes/tags.spec.ts
View file @
779ade54
...
...
@@ -27,7 +27,7 @@ describe('TagPipe', () => {
const
string
=
'
textstring#name
'
;
const
transformedString
=
pipe
.
transform
(
<
any
>
string
);
expect
(
transformedString
).
not
.
toContain
(
'
<a href="/newsfeed/global/top;hashtag=name;period=
24h
'
'
<a href="/newsfeed/global/top;hashtag=name;period=
7d
'
);
});
...
...
@@ -35,7 +35,7 @@ describe('TagPipe', () => {
const
string
=
'
textstring #name
'
;
const
transformedString
=
pipe
.
transform
(
<
any
>
string
);
expect
(
transformedString
).
toContain
(
'
<a href="/newsfeed/global/top;hashtag=name;period=
24h
'
'
<a href="/newsfeed/global/top;hashtag=name;period=
7d
'
);
});
...
...
@@ -43,7 +43,7 @@ describe('TagPipe', () => {
const
string
=
'
textstring [#name
'
;
const
transformedString
=
pipe
.
transform
(
<
any
>
string
);
expect
(
transformedString
).
not
.
toContain
(
'
<a href="/newsfeed/global/top;hashtag=name;period=
24h
'
'
<a href="/newsfeed/global/top;hashtag=name;period=
7d
'
);
});
...
...
@@ -51,7 +51,7 @@ describe('TagPipe', () => {
const
string
=
'
textstring (#name)
'
;
const
transformedString
=
pipe
.
transform
(
<
any
>
string
);
expect
(
transformedString
).
not
.
toContain
(
'
<a href="/newsfeed/global/top;hashtag=name;period=
24h
'
'
<a href="/newsfeed/global/top;hashtag=name;period=
7d
'
);
});
...
...
@@ -59,7 +59,7 @@ describe('TagPipe', () => {
const
string
=
'
textString #NaMe
'
;
const
transformedString
=
pipe
.
transform
(
<
any
>
string
);
expect
(
transformedString
).
toContain
(
'
<a href="/newsfeed/global/top;hashtag=name;period=
24h
'
'
<a href="/newsfeed/global/top;hashtag=name;period=
7d
'
);
});
...
...
@@ -67,10 +67,10 @@ describe('TagPipe', () => {
const
string
=
'
#hash #hashlonger
'
;
const
transformedString
=
pipe
.
transform
(
<
any
>
string
);
expect
(
transformedString
).
toContain
(
'
<a href="/newsfeed/global/top;hashtag=hash;period=
24h
'
'
<a href="/newsfeed/global/top;hashtag=hash;period=
7d
'
);
expect
(
transformedString
).
toContain
(
'
<a href="/newsfeed/global/top;hashtag=hashlonger;period=
24h
'
'
<a href="/newsfeed/global/top;hashtag=hashlonger;period=
7d
'
);
});
...
...
@@ -191,10 +191,10 @@ describe('TagPipe', () => {
'
<a href="/newsfeed/global/top;hashtag=hash1;period=24h
'
);
expect
(
transformedString
).
not
.
toContain
(
'
<a href="/newsfeed/global/top;hashtag=hash2;period=
24h
'
'
<a href="/newsfeed/global/top;hashtag=hash2;period=
7d
'
);
expect
(
transformedString
).
toContain
(
'
<a href="/newsfeed/global/top;hashtag=hash3;period=
24h
'
'
<a href="/newsfeed/global/top;hashtag=hash3;period=
7d
'
);
expect
(
transformedString
).
toContain
(
'
<a href="ftp://s.com"
'
);
expect
(
transformedString
).
toContain
(
'
<a href="mailto:name@mail.com"
'
);
...
...
This diff is collapsed.
Please
register
or
sign in
to comment