Skip to content
Snippets Groups Projects
README.md 1.14 KiB
Newer Older
  • Learn to ignore specific revisions
  • Igor Markin's avatar
    Igor Markin committed
    # Mime Normalizer
    
    
    Igor Markin's avatar
    Igor Markin committed
    Library implements normalisation of HTML and plain parts of a MIME message.
    
    Normalisation strategies documentation:
    https://code.vereign.com/light/documentation/-/blob/master/Validation.md#normalization-strategies
    
    
    Igor Markin's avatar
    Igor Markin committed
    ## Prerequisites
    
    Igor Markin's avatar
    Igor Markin committed
    - [Node.JS](https://nodejs.org/en/) ^10.12.0 || >=12.0.0+
    
    Igor Markin's avatar
    Igor Markin committed
    - [yarn](https://yarnpkg.com/getting-started/install) package manager
    
    ## Initialize project
    
    Igor Markin's avatar
    Igor Markin committed
    `yarn install`
    
    
    Igor Markin's avatar
    Igor Markin committed
    ## Testing
    
    HTML and text files with test cases provided in `__tests__/files`
    If you are going to create a new test case, please follow the structure inside this directory.
    
    - `yarn test`
    - `yarn test:watch`
    
    _Important note: MIME normaliser does not cover all provided test cases.
    Some of them explicitly ignored to indicate which tests has to be fixed. Please refer to `failingCases` arrays inside the test files._
    
    Igor Markin's avatar
    Igor Markin committed
    
    Tests are using both JSDOM and custom Vereign [DOM parser](https://code.vereign.com/code/js-toolbox/gsdom).
    Vereign DOM parser has been developed to support MIME normalisation in Google Add-on and is a must for testing.
    
    Whenever you develop a new normalisation logic, ensure that Vereign DOM parser support functions you apply.