Skip to content
代码片段 群组 项目
  • Lukas Eipert's avatar
    65933140
    Add new test cases for emoji caching · 65933140
    Lukas Eipert 创作于
    Our caching of emoji in localStorage is tricky and barely tested. This
    adds the following test cases:
    
    - when the localStorage is empty
    - when the localStorage stores the correct version
    - when the localStorage stores an incorrect version
    
    These cases are handled _fine_ currently. The following cases are not
    handled well today:
    
    1. when the localStorage contains garbage data (e.g. it got corrupted or
       manipulated somehow). We currently do not catch the error.
    2. when the localStorage cannot save the item. We thought we handled the
       case correctly, _but_: We first try to save the `EMOJI_VERSION` in
       localStorage _and_ then the big blob. So if the saving fails, we have
       updated the version but not the blob.
    65933140
    历史
    Add new test cases for emoji caching
    Lukas Eipert 创作于
    Our caching of emoji in localStorage is tricky and barely tested. This
    adds the following test cases:
    
    - when the localStorage is empty
    - when the localStorage stores the correct version
    - when the localStorage stores an incorrect version
    
    These cases are handled _fine_ currently. The following cases are not
    handled well today:
    
    1. when the localStorage contains garbage data (e.g. it got corrupted or
       manipulated somehow). We currently do not catch the error.
    2. when the localStorage cannot save the item. We thought we handled the
       case correctly, _but_: We first try to save the `EMOJI_VERSION` in
       localStorage _and_ then the big blob. So if the saving fails, we have
       updated the version but not the blob.
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。