File tree 3 files changed +14
-14
lines changed
3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- const { AtomFeed } = require ( './feed/atom' ) ;
4
- const { Document } = require ( './xml/document' ) ;
5
- const { InvalidFeedError } = require ( './errors/invalid-feed' ) ;
6
- const { RssFeed } = require ( './feed/rss' ) ;
3
+ const { AtomFeed } = require ( './lib/ feed/atom' ) ;
4
+ const { Document } = require ( './lib/ xml/document' ) ;
5
+ const { InvalidFeedError } = require ( './lib/ errors/invalid-feed' ) ;
6
+ const { RssFeed } = require ( './lib/ feed/rss' ) ;
7
7
8
8
/**
9
- * @type {{[key: string]: typeof import('./feed/base').Feed} }}
9
+ * @type {{[key: string]: typeof import('./lib/ feed/base').Feed} }}
10
10
*/
11
11
const DATA_PROVIDER_BY_ROOT_ELEMENT = {
12
12
feed : AtomFeed ,
@@ -19,7 +19,7 @@ const DATA_PROVIDER_BY_ROOT_ELEMENT = {
19
19
*
20
20
* @param {string } xmlString
21
21
* A string of XML.
22
- * @returns {import('./feed/base').Feed }
22
+ * @returns {import('./lib/ feed/base').Feed }
23
23
* Returns a feed representation of the XML string.
24
24
* @throws {InvalidFeedError }
25
25
* Throws an invalid feed error if an unrecoverable issue is found with the feed.
Original file line number Diff line number Diff line change 45
45
"testdouble" : " ^3.16.5" ,
46
46
"typescript" : " ^5.5.2"
47
47
},
48
- "main" : " lib/feed-parser .js" ,
48
+ "main" : " index .js" ,
49
49
"nyc" : {
50
50
"reporter" : [
51
51
" html" ,
Original file line number Diff line number Diff line change @@ -6,23 +6,23 @@ const td = require('testdouble');
6
6
7
7
td . config ( { ignoreWarnings : true } ) ;
8
8
9
- describe ( 'lib /feed-parser' , ( ) => {
9
+ describe ( '@rowanmanning /feed-parser' , ( ) => {
10
10
let AtomFeed ;
11
11
let Document ;
12
12
let InvalidFeedError ;
13
13
let parseFeed ;
14
14
let RssFeed ;
15
15
16
16
beforeEach ( ( ) => {
17
- AtomFeed = td . replace ( '../../../ lib/feed/atom' , { AtomFeed : td . constructor ( ) } ) . AtomFeed ;
18
- Document = td . replace ( '../../../ lib/xml/document' , {
19
- Document : require ( '.. /mock/lib/xml/document.mock' ) . createMock ( )
17
+ AtomFeed = td . replace ( '../../lib/feed/atom' , { AtomFeed : td . constructor ( ) } ) . AtomFeed ;
18
+ Document = td . replace ( '../../lib/xml/document' , {
19
+ Document : require ( './mock/lib/xml/document.mock' ) . createMock ( )
20
20
} ) . Document ;
21
- InvalidFeedError = td . replace ( '../../../ lib/errors/invalid-feed' , {
21
+ InvalidFeedError = td . replace ( '../../lib/errors/invalid-feed' , {
22
22
InvalidFeedError : td . constructor ( )
23
23
} ) . InvalidFeedError ;
24
- RssFeed = td . replace ( '../../../ lib/feed/rss' , { RssFeed : td . constructor ( ) } ) . RssFeed ;
25
- parseFeed = require ( '../../../lib/feed-parser ' ) . parseFeed ;
24
+ RssFeed = td . replace ( '../../lib/feed/rss' , { RssFeed : td . constructor ( ) } ) . RssFeed ;
25
+ parseFeed = require ( '../..' ) . parseFeed ;
26
26
} ) ;
27
27
28
28
afterEach ( ( ) => td . reset ( ) ) ;
You can’t perform that action at this time.
0 commit comments