api
|
- |
27 |
config handlers
|
- |
1 |
returns the config object
|
- |
|
files.get handler
|
- |
12 |
returns an array
|
- |
|
test/e2e/api.spec.js |
- |
|
without any query params
|
- |
when filtered=true
|
- |
1 |
every item is filtered
|
- |
|
when filtered=false
|
- |
1 |
every item is not filtered
|
- |
|
when skipProcessing=true
|
- |
1 |
every item is skipProcessing
|
- |
|
when skipProcessing=false
|
- |
1 |
every item is skipProcessing
|
- |
|
when assetProcessor=true
|
- |
1 |
every item is assetProcessor
|
- |
|
when assetProcessor=false
|
- |
1 |
every item is assetProcessor
|
- |
|
when path does not match a file
|
- |
when path does match a file
|
- |
1 |
the file returned is the one we requested
|
- |
|
when the path is relative and matches
|
- |
1 |
the file returned is the one we requested
|
- |
|
when destination does not match a file
|
- |
when destination does match a file
|
- |
1 |
the file returned is the one we requested
|
- |
|
when the destination is relative and matches
|
- |
1 |
the file returned is the one we requested
|
- |
|
collections.get handler
|
- |
14 |
returns an array
|
- |
|
test/e2e/api.spec.js |
- |
|
returns an object
|
- |
|
the object matches the request id
|
- |
|
without any query params
|
- |
1 |
returns an array of just collection names
|
- |
|
when requesting one collection
|
- |
1 |
the object does not have properties that excluded by default
|
- |
|
when requesting one collection with include param
|
- |
3 |
the object has a pages property which is an array
|
- |
|
pages has expected length
|
- |
|
the object does not have properties that excluded by default
|
- |
|
when requesting one collection with multiple include values
|
- |
5 |
the object has a pages property which is an array
|
- |
|
pages has expected length
|
- |
|
files is an object
|
- |
|
files is not an array object
|
- |
|
the object does not have properties that excluded by default
|
- |
|
reptar Reptar
|
- |
14 |
does not call update
|
- |
|
has not called any middleware functions
|
- |
|
has not called any lifecycle functions
|
- |
|
when updated
|
- |
11 |
creates expected instances
|
- |
|
calls every middleware function
|
- |
|
calls every middleware function in the expected order
|
- |
|
willUpdate is called before didUpdate
|
- |
|
didUpdate is called before the first middleware
|
- |
|
willBuild is not called
|
- |
|
didBuild is not called
|
- |
|
and when build is called
|
- |
4 |
has the same number of files generated
|
- |
|
builds site correctly
|
- |
|
last middleware is called before willBuild
|
- |
|
willBuild is called before didBuild
|
- |
|
collection/base CollectionBase
|
- |
7 |
constructor
|
- |
2 |
throws when no collection name is given
|
- |
|
accepts a name and no config object
|
- |
|
isFiltered
|
- |
1 |
returns if a file in collection is filtered
|
- |
|
sortFiles
|
- |
4 |
sorts integer value descending
|
- |
|
sorts integer value ascending
|
- |
|
sorts date value descending
|
- |
|
sorts date value ascending
|
- |
|
collection/index
|
- |
1 |
create
|
- |
1 |
creates the right Collection class
|
- |
|
collection/page CollectionPage
|
- |
3 |
constructor
|
- |
2 |
throws an error if it doesn't get expected values
|
- |
|
creates a unique id
|
- |
|
setData
|
- |
1 |
saves passed in values
|
- |
|
collection/type/file-system FileSystemCollection
|
- |
14 |
_isFileInCollection
|
- |
3 |
is false if file's path is not within collection's path
|
- |
|
is true if file's path includes collection's path
|
- |
|
is false if file's path is excluded from collection
|
- |
|
populate
|
- |
2 |
adds files to collection
|
- |
|
does not add files to collection
|
- |
|
createCollectionPages
|
- |
1 |
adds files to collectionPages
|
- |
|
createCollectionPages
|
- |
1 |
returns early if no pagination permalinks are set
|
- |
|
_setExcludePaths
|
- |
2 |
can set exclude paths
|
- |
|
does not add its own path to the exclude path array
|
- |
|
_isFileExcluded
|
- |
5 |
is false when FileSystemCollection has no path
|
- |
|
is false when FileSystemCollection has metadata
|
- |
|
is false when no excludePaths are set
|
- |
|
is true if the file path is contained in our excludePaths
|
- |
|
is false if the file path is not in our excludePaths
|
- |
|
collection/type/metadata MetadataCollection
|
- |
6 |
_isFileInCollection
|
- |
2 |
is false if file does not have collection's metadata key
|
- |
|
is true if file has collection's metadata key
|
- |
|
populate
|
- |
2 |
adds files to collection
|
- |
|
does not add files to collection
|
- |
|
createCollectionPages
|
- |
2 |
returns early if no pagination permalinks are set
|
- |
|
adds files to collectionPages
|
- |
|
config/index Config
|
- |
9 |
constructor
|
- |
1 |
can create an instance
|
- |
|
update
|
- |
8 |
can load a config file that exports a function
|
- |
|
calculates paths correctly
|
- |
|
throws when given an invalid config object
|
- |
|
sorts file defaults in correct precedence order
|
- |
|
coerces middleware and lifecycle config values to arrays
|
- |
|
asset
|
- |
3 |
coerces asset test values to functions
|
- |
|
ensures asset.use value is a function
|
- |
|
correctly tests against different file paths
|
- |
|
data-files DataFiles
|
- |
2 |
update
|
- |
2 |
returns empty object when no data objects found
|
- |
|
works
|
- |
|
file File
|
- |
6 |
has all proper values on its data object
|
- |
|
constructor
|
- |
2 |
can create an instance
|
- |
|
calculates destination path
|
- |
|
default values from config
|
- |
1 |
applies default values that match
|
- |
|
_calculateDestination
|
- |
1 |
allows custom file url property
|
- |
|
filtered
|
- |
1 |
set correctly
|
- |
|
filter/future-date futureDate
|
- |
2 |
should default to use date as key value
|
- |
|
should allow setting of what date key to use
|
- |
|
filter/index
|
- |
1 |
isFileFiltered
|
- |
|
filter/metadata metadata
|
- |
2 |
should return true when a match is found
|
- |
|
should return false when a match is not found
|
- |
|
metadata Metadata
|
- |
2 |
get
|
- |
2 |
returns the entire object
|
- |
|
returns the object at a path
|
- |
|
parse/front-matter
|
- |
2 |
parse
|
- |
1 |
correctly takes a string and produces a json object
|
- |
|
stringify
|
- |
1 |
correctly takes json object and produces a string
|
- |
|
parse/yaml
|
- |
3 |
parse
|
- |
3 |
empty string
|
- |
|
undefined
|
- |
|
proper yaml string
|
- |
|
url Url
|
- |
10 |
interpolatePermalink
|
- |
5 |
handles simple interpolations
|
- |
|
handles duplicate param interpolations
|
- |
|
handles permalink with no interpolation
|
- |
|
throw if it can't find value to interpolate in permalink
|
- |
|
handles special date permalink values
|
- |
|
pathHasMarkdownExtension
|
- |
1 |
matches known extensions
|
- |
|
replaceMarkdownExtension
|
- |
1 |
replaces known markdown extensions
|
- |
|
makeUrlFileSystemSafe
|
- |
2 |
appends index.html to a url that has no file extension
|
- |
|
does not append index.html to a url that does not need it
|
- |
|
makePretty
|
- |
1 |
works
|
- |
|